You need to sign in to do that
Don't have an account?
Salesforce to Facebook integration errors
I want to integrate Facebook and Salesforce.
I followed the instructions on this page exactly: https://developer.salesforce.com/page/Getting_Started_with_the_Force.com_Toolkit_for_Facebook (https://developer.salesforce.com/page/Getting_Started_with_the_Force.com_Toolkit_for_Facebook" rel="nofollow)
However when I click on my Sites Url (step 5 on the instructions) I am redirected to the Facebook page and I get this message:
'The following permissions have not been approved for use and are not being shown to people using your app: read_stream and publish_actions. Submit them for review or learn more' - the tutorial does not mention needing permissions.
If I click ok I it processes and then takes me to:
https://mySFsite/apex/FacebookSamplePage?code=xxx
and then displays the Authorization required VF page.
I have checked all the permissions on the Public Access Setting on Sites
If I try to preview Active Site Page as admin I get this error message:
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application
configuration.",
"type": "OAuthException",
"code": 191
}
}
I searched this error on google and everyone says that it is because the Sites URL and the URL in the Facebook app are different. I have tried many different permutations but to no avail.
If the URL of my site and the URL in FB app are the same I only get this error message when I preview as admin.
I only this error message by clicking on the Sites Url when the URL in Facebook is actually different. Otherwise I just get the Authorization required VF page.
Some help would be greatly appreciated :)
Thank you for your help !!!!
All Answers
The FB Sites URL is: https://fbzoona-developer-edition.na11.force.com/
The Sites URL is: http://fbzoona-developer-edition.na11.force.com/
That's the same thing and I just tested this URL with my FB app and this works fine for me.
I received this error in the debug log in Salesforce:
Insert failed. First exception on row 0; first error: STRING_TOO_LONG, AccessToken: data value too large: qohM+NLy+IfY9ui+8zm5TLXGg4GNFQki1bcd10tyoJmBJ6FRfLR/EzIEk+YoG+gjMH+o6l3rWmKd3qCpdQSVSKFn1w17/tU5xXzfSCx3dADujCQ9eZQFvTjy69OO3/xfsCMORzxtPwBhLdIdedb6M
It might be a setting in Facebook. Do you know what I could look at?
Class.FacebookToken.setAccessToken: line 76, column 1
insert new FacebookSession__c(AccessToken__c = FacebookCrypto.encrypt(accessToken), SessionId__c = sessionId, Expiry__c = DateTime.now().addSeconds(expires));
I looks like the field size is too small (after this encrypto function) - I am trying to change it - it has a validation rule etc on it. This is an app that I installed so I am still trying to understand how it works.
Thank you Vinit I will let you know if this works!!!
Thank you for your help !!!!
Please mark it as best answer to help others :)
You will need to:
1. Comment out any reference to AccessToken__c in the FacebookToken class,
2. Change the Field type to Long text area
3. Uncomment what you did in point 1.
hope this helps
Reps