How do I get activity from my app using the Facebook API?

I have an app that uses the Graph API to post an activity to a user's timeline, however I want to be able to display that activity inside the app itself (and potentially friends activity, but that's a different issue).

I cannot find a way to access my own application activity. I found this: https://developers.facebook.com/docs/authentication/permissions/#open_graph_perms and tried to add permission for user_actions: NAMESPACE, however I can't get the activity.

I can successfully get video / music using user_actions.video/music permission and call /me/music.listens or video.watches, however I cannot find a way to get this for my own activity.

For example, let's say my action is "cook", I've tried:

/me/NAMESPACE:cook
/me/NAMESPACE:cooks
/me/NAMESPACE.cook
/me/NAMESPACE.cooks

      

But nothing works - am I missing something?

+3


source to share


1 answer


Your app can read any data posted to it without asking for any other permissions.

You read actions from the same url you submitted:

if you sent your actions to:

POST https://graph.facebook.com/me/yournamespace:cook?access_token=USER_ACCESS_TOKEN

      



then you read them with GETing:

GET  https://graph.facebook.com/me/yournamespace:cook?access_token=USER_ACCESS_TOKEN

      

You can read the actions of the friends of the users you added to your app without any additional rights - you published it anyway and that user has already run your app. Again, you just GET:

GET  https://graph.facebook.com/USER_ID/yournamespace:cook?access_token=USER_ACCESS_TOKEN

      

+3


source







All Articles