6

The Facebook posts in which you're tagged in - using @Name - appear in your wall feed.


A friend of mine posted a link and tagged me in it:

The startup Guide


On the Graph API documentation, when I click on my wall feed link (Ctrl + F: Profile feed), I'm able to see this post:

  ...
  {
     "id": "XXX",
     "from": {
        "name": "XXX",
        "id": "XXX"
     },
     "to": {
        "data": [
           {
              "name": "XXX",
              "id": "XXX"
           },
           {
              "name": "Christophe Maillard",
              "id": "XXX"
           }
        ]
     },
     "message": "The startup Guide (cc XXX, Christophe Maillard)",
     "link": "http://mashable.com/2012/06/27/startup-guide-1000-users/",
     "name": "How to Get to Your First 1,000 Users",
     "caption": "mashable.com",
     "description": "With the help of some smart marketers and entrepreneurs, we're created a clear outline for attracting your startup's first 1,000 users.",
     ...
  }
  ...

The URL of this feed is https://graph.facebook.com/me/feed?access_token=XXX.


When copy/pasting the given access token - the one replaced by XXX in the URL above - within the debugger, I get something like this:

Access Token Debugger

As we can see, the access token is generated by the app Test_console which used quite a lot of scopes.


Then, I go to the Graph API Explorer, I generate an access token using the Get Access Token button, and I specify all the scopes the debugger gave me, i.e. the ones the Test_console app used to generate its working access token. Finally, I access the URL me/feed by submitting the GET request. The problem: I can't see the post in question in which I'm tagged in with the explorer.

I also have my own app, and it reacts exactly like the Graph API Explorer: I can't find that post in my wall feed using the Graph API as well.

Obviously, it's possible to get the posts in which you're tagged in using the Graph API, because the Test_console app is able to generate an appropriate access token. But how can I get such an access token for my own app?

4

1 回答 1

5

您需要为您的应用授予适当的权限。在图形 api explorer https://developers.facebook.com/tools/explorer?method=GET&path=me在应用程序字段(右上角)中切换到您的应用程序以查看当前授予您的应用程序的权限(通过单击“再次获取访问令牌”按钮)。然后确保你添加了正确的(我认为它是你所追求的 read_stream )https://developers.facebook.com/docs/authentication/permissions/

于 2012-07-05T10:51:45.477 回答