Message Boards Message Boards


Set up Facebook API on Mathematica?

Posted 1 year ago
6 Replies
0 Total Likes

I have googled and already read the Facebook Documentation on Wolfram Website. I followed these steps.

  1. facebook = ServiceConnect["Facebook", "New"] Outcome: My Browser opened up, I gave the required permission. I came back to Mathematica, It gave a message in another window which was this, OAuthSigning`OAuthAuthentication::accfail: Failed to obtain OAuth access token for Facebook. On the main program, I saw ServiceConnected[ (Facebook Connected BUTTON)] SO FAR SO GOOD.

  2. facebook["Cover"] , but it again opens the browser, this time WOLFRAM CONNECTOR automatically says thanks for authorizing, your connection .......'some code'. But Mathematica shows this error, ServiceObject::noauth: The service is not authenticated. Try using ServiceConnect.enter image description here

6 Replies

Hi Archit,

Are you still experiencing this error? What Mathematica version do you have?

Please note that Facebook is very strict with their API security and require permissions not just to connect but basically for every request.

Posted 1 year ago

hi Chriatian

Yes, I am still facing this error. I am using Mathematica 11.1 on Ubuntu.

I just observed this: After mathematica leads me to the sign in window on the browser, I get this error in a few seconds.enter image description here

why didn't you investigate ServiceConnect as it suggested ?

Posted 1 year ago

I did. The first step was serviceconnect, if you look closely.

Posted 1 year ago

Does it work with anyone here?

This should work. Please check which version of ServiceConnection_Facebook,OAuth,OAuthSIgning paclets are being used. Ideally it should be:

In[1]:= PacletInformation["ServiceConnection_Facebook"]

Out[1]= {"Name" -> "ServiceConnection_Facebook", 
 "Version" -> "11.1.12", "BuildNumber" -> "", "Qualifier" -> "", 
 "WolframVersion" -> "11+", "SystemID" -> All, "Description" -> "", 
 "Category" -> "", "Creator" -> "", "Publisher" -> "", 
 "Support" -> "", "Internal" -> False, 
 "Location" -> 
 "Context" -> {"Facebook`", "FacebookLoad`"}, "Enabled" -> True, 
 "Loading" -> Manual}

In[2]:= $Version

Out[2]= "11.1.0 for Microsoft Windows (64-bit) (March 13, 2017)"

In[3]:= facebook = ServiceConnect["Facebook"]

Out[3]= ServiceObject["Facebook", 
 "ID" -> "connection-a561cb52c34c33b0a72908df611cb7d9"]

In[4]:= facebook["Cover"] // Head

Out[4]= Image

In[5]:= PacletInformation["OAuth"]

Out[5]= {"Name" -> "OAuth", "Version" -> "11.1.48", 
 "BuildNumber" -> "", "Qualifier" -> "", "WolframVersion" -> "11.0+", 
 "SystemID" -> All, "Description" -> "", "Category" -> "", 
 "Creator" -> "", "Publisher" -> "", "Support" -> "", 
 "Internal" -> False, 
 "Location" -> 
Repository\\OAuth-11.1.48", "Context" -> {"OAuthLoader`", "OAuth`"}, 
 "Enabled" -> True, "Loading" -> Automatic}

In[6]:= PacletInformation["OAuthSigning"]

Out[6]= {"Name" -> "OAuthSigning", "Version" -> "11.1.0", 
 "BuildNumber" -> "", "Qualifier" -> "", "WolframVersion" -> "10.4+", 
 "SystemID" -> All, "Description" -> "", "Category" -> "", 
 "Creator" -> "", "Publisher" -> "", "Support" -> "", 
 "Internal" -> False, 
 "Location" -> 
  "C:\\Program Files\\Wolfram \
 "Context" -> {"OAuthSigning`"}, "Enabled" -> True, 
 "Loading" -> Manual}

You can also try deleting OAuth and ServiceConnection_Facebook directories from FileNameJoin[{$UserBaseDirectory, "Paclets", "Repository"}] and try connecting to Facebook service again.

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

Group Abstract Group Abstract