I am currently preparing a small website for which my girlfriend works repeatedly. This is just a simple modern one page design. My girlfriend is also the admin page again and again. Now, I want to use the information of Facebook pages (like opening hours, next events ... not much, which is public) to display on the website. I was planning to pull this data every 30 minutes to stop the API flood. That's why I logged in as my girlfriend on Facebook (this is my first fight with Facebook API / App development personally, so I do not know it's true), developer profile and app created.
Now, I can find ways to get the right access to the page using methods like '/ me / accounts' and I can play with the graph API Explorer and get page events and stuff And everything looks okay, except that I can not retrieve this data from my long live app id / incognito or app access_token.
So, how does this work? I think the Facebook API is thin on this subject. What I need is something like this:
FacebookSession :: setDefaultApplication ('APP_ID', 'APP_SECRET'); $ Session = Facebook session: new app session (); $ Access_token = getMagicAccessToken from somewhere; $ Request = new FacebookRequest ($ session, 'GET', '/ PAGE_ID / event', ['access_token' = & gt; $ access_token]); $ Response = $ request-> carry about (); $ Graph object = $ response- & gt; GetGraphObject ();
But I do not know how to get the right access_token
Please help ... This is bothering me because I thought it would be very easy. .
P>
Comments
Post a Comment