问题
I have developed an app using Facebook Graph API and Open Graph. I want my app to display custom data, when the user performs an action on my website. I read about open graph and added a open graph tags, etc. I have used the following code
$post_url = "https://graph.facebook.com/me/myappnamespace:mycustomaction?method=post".
"&mycustomobject=mywebpage".
"&access_token=".$_SESSION['access_token'];
Right now, whenever a user uses this app, it appears in his activity. But, it is not shared on his timeline. What permissions do i need to ask the user to be able to post to his own timeline? Currently, I am asking for publish_actions and publish_stream
What am I missing? I followed the exact steps in the tutorial, but am not able to post to the timeline using opengraph.
回答1:
You no need to add any permissions except publish_actions
and publish_stream
. But you should add a new tag like fb:explicitly_shared
. Set this as BOOL
value. If you set true, it will show in the user's timeline, else it will not.
来源:https://stackoverflow.com/questions/15171448/app-does-not-post-to-users-timeline