开发者

[facebook]Can I post message to wall from apps using page user?

I want to post some message to wall using my app. But for some reason, my users want to show the page name instead of user name in the wall. I thought maybe I can use [use facebook as page] menu.http://stackoverflow.com/questions/2901316/post-to-wall-as-facebook-app-not-as-a-user But I was wrong. In that case I can't use my app in canvas page. I saw the youtube app.They can post the 开发者_C百科message as page user. http://apps.facebook.com/videobox/pages Do I miss something? Any idea will be help. Thanks!


Are you looking to publish to a Page's wall? Your app will need the following 2 extended permissions from the user:

  • publish_stream
  • manage_pages

With those two permissions, you can first get a list of all of the pages that the user is an admin of, along with the Page's access tokens as follows:

GET URL: https://graph.facebook.com/me/accounts?access_token={user_access_token}

Once you have the Page's access_token, you can now Publish to the Page's wall as follows:

POST URL: https://graph.facebook.com/{page_id}/feed
POST BODY: access_token={page_access_token}&message=Test+Post

I hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜