Message Boards Message Boards

ServiceExecute with Facebook

Posted 10 years ago

I'm having trouble accessing the Facebook APIs using ServiceExecute.

I'm using upgraded Mathematica 10.2

I'm able to use Facebook with the ServiceConnect function. The function call returns a valid ServiceObject noting that Facebook is Connected. However, subsequent calls with ServiceExecute return nothing. So a sequence like this:

    facebook = ServiceConnect["Facebook"];  (* 1st time through, cut/paste API Key. returns ServiceObject[Facebook Connected] *)
    friends = ServiceExecute[facebook, "Friends"];
    friends   (* returns  output of: Out[1]= { }  *)

I suspect one of two things, the functions are buggy in Mathematica 10.2 OR I have to configure a particular facebook security setting to support the ensuing API calls. My friends list is viewable to the public and I've relaxed all of the Facebook profile settings without any luck.

Any thoughts?

POSTED BY: tara
3 Replies

Hi Tara,

Sorry this answer comes a little bit late. I'm working on this project so let me help you debug what's going on here.

First of all, Facebook changed this year how they work with permissions so we've been updating our services to acommodate that. Access to most requests are now more restricted.

Can you give me the output of:

fb = ServiceConnect["Facebook"];
fb["FirstName"]
fb["Picture"]
fb["Timezone"]

Let me know if that's working for you.

Thanks

Same problem here: enter image description here

POSTED BY: Kay Herbert

OK, I just wanted to be sure this was not an overall malfunction.

Facebook changed their permissions in a way that, now, you can only see from Mathematica, the friends who authorized our app. The same happens with Wolfram|Alpha Personal Analytics for Facebook. If you go to that link you'll see there's a notice about that update.

Unfortunately, that's the new Facebook policy and is not something we can change from our end :(

If you can make a friend authorize our app (WolframConnector) and run again

fb["Friends"]

and check if your friend now appears there, that would confirm this.

I wish we could do more from here but, while Facebook keeps this type of policy, there's a lot of limitations if your friends don't authorize our app.

Oh BTW, I see in your In[48] that you did:

friends = ServiceExecute[Facebook, "Friends"]

Remember that when using the ServiceExecute function, the service names has to be a string:

friends = ServiceExecute["Facebook", "Friends"]

That's just a note for future uses.

Please feel free to keep posting if you have more issues with this or other services.

Thanks

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract