0

I would like to perform 'likes' in Facebook walls (from an Android app) using the Temboo Library, and I see there is a Choreo for this.

My problem is that the required parameters are the AccessToken (as usual), and an ObjectID, and I have no idea where can I get a proper ObjectID related for example to a Facebook Group Fan Page I would like to 'like'. How is the conversion from a certain URL to an ObjectID?

EDIT

I specify the following permissions: "email,publish_actions,user_likes", as stated in Facebook docs:

Note that the like action requires the existing user_likes Permission

I can post to the wall, but whenever I try to 'like' a web, for example: "https://www.facebook.com/pages/Guitar/113099055370169", I get:

com.temboo.core.TembooHttpException: {"output":{"Response":""},"truncatedItems":[],"execution":{"endtime":"1396561663481","id":"a5cfd72449539570145298fd4d668ba","lasterror":"A HTTP Error has occurred: The remote server responded with a status code of 403. Typically this indicates that access to the specified resource is forbidden. The data returned from the remote server was: {\"error\":{\"message\":\"(#200) App does not have permission to make this call\",\"type\":\"OAuthException\",\"code\":200}}.  The error occurred in the HTTPSend (Facebook) step.","starttime":"1396561663246","status":"ERROR","errortime":"1396561663445"}}

EDIT 18th June, 2014

Finally I retook the task to let my Android users like a Facebook page. I finally managed to do the WebView / web button trick, so they can tap on a web 'like' button and the like is properly performed. My problem comes when trying to check if the like action was OK. I am using the FQL choreo in two different ways, but both queries give empty results. My test Facebook user has definetely several likes performed, what am I missing?

My FQL queries using Temboo:

http://postimg.org/image/o22cxhxo9/

http://postimg.org/image/5xzccuzzt/

thelawnmowerman
  • 11,956
  • 2
  • 23
  • 36
  • @Cormac Driver, I would really appreciate if you take a look to this ;-) – thelawnmowerman Apr 03 '14 at 11:34
  • It looks like you may not have requested the user_likes scope when going through the OAuth process. Please try that and let us know how you get on. – Cormac Driver Jun 18 '14 at 15:54
  • My requested permissions are "email,publish_actions,user_likes,publish_stream,read_stream" – thelawnmowerman Jun 18 '14 at 18:28
  • Sorry that didn't work. Does your application 'like' objects via the Open Graph or the Graph API? What happens if you try running this Choreo with your access token: https://temboo.com/library/Library/Facebook/Actions/General/Likes/ReadLikes/ – Cormac Driver Jun 18 '14 at 19:23

1 Answers1

1

You can use a different Choreo to return that value:

https://temboo.com/library/Library/Facebook/Searching/FQL/

Here's a screenshot that shows you how to use this Choreo to get the object ID for a URL.

And here are the inputs I used:

  • Access Token: yourOwnAccessToken
  • Conditions: url="http://mashable.com"
  • Fields: url, id, type, site
  • Table: object_url

Hopefully that solves your problem. Good luck!

Cormac Driver
  • 2,511
  • 1
  • 12
  • 10
  • Thank you very much for answering! Now I can retrieve the ID without any problem, but whenever I try to perform the "like", I get the error I added to my question above :-( Could it be related to this matter? http://stackoverflow.com/a/3709409 – thelawnmowerman Apr 03 '14 at 22:00
  • Have you tried adding the publish_stream permission? – Cormac Driver Apr 04 '14 at 13:42
  • Yes, but it made no difference. A colleague pointed that he thinks (not for sure) that Facebook forbids automatic likes to resources not owned by the user to avoid Spam. Could that be true? In that case, would it be impossible for Temboo to do this? – thelawnmowerman Apr 29 '14 at 14:36
  • Your colleague is correct. Facebook restrict what can be liked programatically. More info here: http://stackoverflow.com/questions/8802910/how-can-i-like-pages-url-with-facebook-sdk-api – Cormac Driver Apr 29 '14 at 20:43