-2

There are many examples on the web about how to get facebook token of a Fanpage in PHP but basically nehum works.

The tutorial is very bad, do not explain the right way or are outdated.

I would like eum definitive answer. How do I get access_token a Facebook page?

What is the correct PHP code for this?

I have tested several and none works.

Thank you.

Ed Dias
  • 175
  • 1
  • 3
  • 11
  • 1
    tutorial: http://www.devils-heaven.com/facebook-access-tokens/ – andyrandy Aug 31 '15 at 14:02
  • The code is this? $request = new FacebookRequest($session, 'GET', '/PAGE-ID?fields=access_token'); $response = $request->execute(); $result = $response->getGraphObject()->asArray(); $pageToken = $result['access_token']; $facebookSession = new FacebookSession($pageToken); – Ed Dias Aug 31 '15 at 14:11
  • 1
    you really should not post code in comments... – andyrandy Aug 31 '15 at 14:58

1 Answers1

0

I don't know where you are looking if you're saying, but IMHO the official docs provide all what is necessary:

Tobi
  • 31,405
  • 8
  • 58
  • 90
  • Thank you for cooperation but the problem is that for beginners in programming as I understand this advanced code is very complicated. I knew this page but do not understand how to do. – Ed Dias Aug 31 '15 at 15:01
  • It's not complicated at all. Grab the sample code, change the permissions according to the docs, and call `/me/accounts`. @luschn even gave a link to his tutorial... – Tobi Aug 31 '15 at 15:05
  • Also, see http://stackoverflow.com/questions/23907802/post-to-a-facebook-page-without-manage-pages-permission-using-php/23908207#23908207 and http://stackoverflow.com/a/28600796/1603357 – Tobi Aug 31 '15 at 15:07
  • I need help, still can not solve the mystery of how to get the token of a page. Can anyone help? – Ed Dias Sep 03 '15 at 17:43