Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook posting with link param failing on first try

I am trying to post to Facebook using Graph API and one of the parameters on that is link.

Example URL:

https://graph.facebook.com/me/feed?access_token=Xxxx&message=&link=http://something/token/123456B&description=test

Every time the link changes the posting fails the first time. If I retry twice or thrice the call works.

Here is the error I am getting :

{"error":{"message":"Call to a member function getImageInfo() on a non-object","type":"BadMethodCallException"}}

This used to work just fine but suddenly stopped working 2 days ago. The link always changes for us and such its breaking all the posts.

Did anything change with the API recently with Facebook ? Any help will be highly appreciated

like image 915
user2030770 Avatar asked Jan 31 '13 23:01

user2030770


1 Answers

well i fixed...i think... in the url link, the meta og:image it can't be empty as '' and the link must be absolute. if the link don't have an image, don't put the meta. by the way i update the app at the fb app panel to February 2013 Breaking Changes to activate.

like image 118
Omar Felipe Salas Quiñones Avatar answered Sep 26 '22 17:09

Omar Felipe Salas Quiñones