Facebook PHP SDK - Post to user's wall as app and not user. How?

℡╲_俬逩灬. 提交于 2020-01-03 04:53:07

问题


I have a few questions about Facebook PHP SDK I haven't found the answers to yet, hope someone here can help.

I have made a page where users connect to Facebook to be able to share things via my site on their wall. I don't want to use the offline_permission. But I need to be able to delay post, cause sometimes we need to confirm choices they use. I read that YOU CAN post at any time with stream_publish, but you need to post as THE APP and not THE USER. Right now I think I post as the user. How do I post as the app?

Thanks!


回答1:


Read the Facebook Authentication documentation, specifically the section titled "App Login" where it tells you how to authenticate as the application. Basically you navigate to this url: https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials and that will give you a session token to act as your page.



来源:https://stackoverflow.com/questions/6408950/facebook-php-sdk-post-to-users-wall-as-app-and-not-user-how

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!