Facebook API: (SDK Version 3) Authenticate and Post to Page
I've just downloaded the Facebook SDK Version 3 and there are some significant changes. My goal is to get everything working so a user can be authenticated, then when they add a new page (different screen) they can post to that page. Please take a look at my code and let me know how it can be fixed! Currently, the a开发者_开发百科ccess_token and secret aren't being retrieved, among other things
authenticate.php: http://pastebin.com/y0Rdmmbs
add_page.php: http://pastebin.com/17ExQzCB
If you have better code to use, rather than the code shown in those files, that's totally fine with me. At this point I just want it to work! Thanks in advance!
I won't write your code for you, but I will point you in the right direction.
Facebook developer documentation is by no means a well maintained resource, but their sections on Authentication and the PHP SDK are perfectly fine for your needs. On the authentication page, they even have an example of how to use the PHP SDK to authenticate.
- https://developers.facebook.com/docs/authentication/
- https://developers.facebook.com/docs/reference/php/
精彩评论