J N
asked on
facebook api / sdk v4
Hi,
i am trying to add some of facebook functions to a website. i have looked through the developer documentation however i find it very choppy and difficult to follow.
i am trying to create a facebook object using the app id and app secret and use this to get the access_token. the information obtained will only for one set account. i would like to retrieve posts, information and post timeline posts. however im not sure what parts of the libraries i will even need
i have downloaded the sdk library here : https://github.com/facebook/facebook-php-sdk-v4
i believe i only need scripts from the src folder however i dont think i need to include all of them
any help is greatly appreciated
i am trying to add some of facebook functions to a website. i have looked through the developer documentation however i find it very choppy and difficult to follow.
i am trying to create a facebook object using the app id and app secret and use this to get the access_token. the information obtained will only for one set account. i would like to retrieve posts, information and post timeline posts. however im not sure what parts of the libraries i will even need
i have downloaded the sdk library here : https://github.com/facebook/facebook-php-sdk-v4
i believe i only need scripts from the src folder however i dont think i need to include all of them
any help is greatly appreciated
Did you create an app on facebook yet? https://developers.facebook.com/ Apps > Create New App
Get your credentials.
It has been a while since I have updated any of my facebook apps. They keep changing and I stopped trying to keep things up to date. But I think this has been answered here already. See if the thread below helps. Most important thing is to create your app on facebook first and get your credentials and set up permissions for the app on facebook first. Just doing that solves most issues.
https://www.experts-exchange.com/questions/28101053/Facebook-Posts-on-Web-Page.html
https://developers.facebook.com/docs/graph-api/reference/v2.0/post/
Get your credentials.
It has been a while since I have updated any of my facebook apps. They keep changing and I stopped trying to keep things up to date. But I think this has been answered here already. See if the thread below helps. Most important thing is to create your app on facebook first and get your credentials and set up permissions for the app on facebook first. Just doing that solves most issues.
https://www.experts-exchange.com/questions/28101053/Facebook-Posts-on-Web-Page.html
https://developers.facebook.com/docs/graph-api/reference/v2.0/post/
This is only one piece of the puzzle (and it's a big research project). It applies to the parse error in the first code snippet.
Please see this link, perhaps downvoted because the PHP comments are not supposed to be taken for pedestrian matters such as parse errors. That said, it seems to identify the issue with use inside a function definition.
Please see this link, perhaps downvoted because the PHP comments are not supposed to be taken for pedestrian matters such as parse errors. That said, it seems to identify the issue with use inside a function definition.
ASKER
Hi,
i think it is best to deal with facebook using cURL and http referrals instead of their SDK. ive had soo many issues with it that i dont think its worth diving into
thanks
i think it is best to deal with facebook using cURL and http referrals instead of their SDK. ive had soo many issues with it that i dont think its worth diving into
thanks
Wow, a grade of "C" -- what did we do wrong here? I think the E-E Grading Guidelines expect anyone to explain a grade like that.
http://support.experts-exchange.com/customer/portal/articles/481419
http://support.experts-exchange.com/customer/portal/articles/481419
ASKER
Hi,
My reasoning is as follows:
1. Took approx a month to get an response
2. Padas response was something a work around and not specifically what i was looking for - i was already using http
3. Ray you pointed me in another direction for more information which was somewhat useful
4. eventually, i came up with my own solution based on my own research
5. i though that both of you should be rewarded for your work but didnt help me come up with a solution ( i did it in the month that it took for the question to be answered and waited to see if the experts could come up with something i didnt see).
i think based on my explanation the score is fair
My reasoning is as follows:
1. Took approx a month to get an response
2. Padas response was something a work around and not specifically what i was looking for - i was already using http
3. Ray you pointed me in another direction for more information which was somewhat useful
4. eventually, i came up with my own solution based on my own research
5. i though that both of you should be rewarded for your work but didnt help me come up with a solution ( i did it in the month that it took for the question to be answered and waited to see if the experts could come up with something i didnt see).
i think based on my explanation the score is fair
A grade of "C" is inappropriate, especially when you've asked a question that requires a lot of research and has a lot of moving parts.
i came up with my own solutionThe right thing to do is post your own solution and accept that as the answer. Then anyone visiting in the future will gain the benefit of your research.
ASKER
Hi,
I created a new question to attack another area of the above question
i posted my solution in the top question part
https://www.experts-exchange.com/questions/28463740/facebook-wallpost-using-http-post.html
I created a new question to attack another area of the above question
i posted my solution in the top question part
https://www.experts-exchange.com/questions/28463740/facebook-wallpost-using-http-post.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
my solution
ASKER
Open in new window
error:
Parse error: syntax error, unexpected 'use' (T_USE) in /home/content/21/10892721/
line 999:
use Facebook\FacebookSession;
if i remove
Open in new window
i do not get the error and then if i try and call the classes like so
$conn= new FacebookSession('xxx','yyy
i get an error that the class does not exist
i look on the library that has class FacebookSession documented and there are errors in the script (may just be dreamweaver)
if i remove the namespace line in the scripts and run my function again i get the following as the conn var
Open in new window
i no longer get any errors regarding the namespace
moving on i then try and get the profile using:
Open in new window
running this code i get the following error
Fatal error: Uncaught exception 'FacebookAuthorizationExce
any help is greatly appreciated