问题描述
我使用Facebook的C#SDK和我似乎无法获得饲料数据传回使用图形API。
I'm using Facebook C# SDK and I can't seem to get feed data back using Graph API.
我从获得以下扩展权限用户:
I've obtained the following extended permissions from the user:
范围= offline_access,publish_stream,publish_checkins,create_event,read_stream,user_about_me,user_events,user_hometown,USER_LOCATION,user_photos,read_friendlists,read_requests, user_checkins,user_relationships,user_online_presence,user_notes,user_likes,user_work_history
我对离线访问的访问令牌。
I have an access token for offline access.
我能够顺利获取用户名/好友信息,但似乎无法获得饲料的数据。
I'm able to retrieve userid/friends information without a hitch, but can't seem to get feed data.
我得到的下面返回:
{
"data": [
]
}
我获得的令牌类型=client_cred如果有差别。这个过程与用户离线运行,所以我没有使用我的别名。
I obtained the token with type="client_cred" if that makes a difference. The process runs with user offline, so I'm not using the "me" alias.
能有人给什么我做错了一些方向?
Can someone give some direction on what I'm doing wrong?
推荐答案
型获得的令牌= client_cred意思是代表自身的应用程序,而不是代表特定用户的应用。这意味着它只能看到的东西,是对所有用户可见。如果你想抓住代表特定用户的信息,您需要使用您获得该用户的访问令牌。既然你问offline_access,当你获得了用户的访问令牌,该令牌不会很快到期,并可以在数据库中保持它周围。
A token obtained with type=client_cred means "the application on behalf of itself", rather than "the application on behalf of a specific user". This means that it can only see stuff that's visible to all users. If you want to grab information on behalf of a particular user, you need to use that user's access token that you acquired. Since you asked for offline_access, when you acquire an access token for a user, that token won't expire quickly, and you can keep it around in a database.
这篇关于Facebook的图形API" /用户名/饲料"返回空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!