I got this error when i try to connect with SOCIAL AUTH 4.4 TO INTEGRATE FACEBOOK API IN ANDROID.
Few days back everything is working fine and i am able to post the data to Facebook from my application.
Now i am getting this error while trying to access the Facebook from my application.
Invalid Scopes: offline_access, publish_stream. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
After reading the documentations i came to know that , The permissions offline_access and publish_stream are deprecated, thus cannot be requested anymore.
So i replaced my properties file according to the documentation.
publish_stream can be replaced by publish_actions, offline_access is gone.
Like Below:::
#facebook
graph.facebook.com.consumer_key = XXXXXXXXXXXXX
graph.facebook.com.consumer_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXX
graph.facebook.com.custom_permission = publish_actions,email,user_birthday,user_location
Still i am getting the same issue. Where exactly i am missing..
As Facebook changed too many internal settings recently it is better to use Facebook SDK rather than Social Auth
For getting started working with Facebook sdk you need to create a project in facebook developer console kindly refer below link to proceed.
One App is created download and import latest facebook sdk in to your project
After import set facebook sdk as a library project to your eclipse
add below code in your mainfestifile application tag
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
where facebook_app_id is app id generated while creating a project in developer console
dont forget to include internet permissions
then add the following code in your Activity
//variables need to be declared
CallbackManager callbackManager;
ShareDialog shareDialog;
//in activity oncreate
FacebookSdk.sdkInitialize(getApplicationContext());
callbackManager = CallbackManager.Factory.create();
shareDialog = new ShareDialog(this);
//For example sharing add the below snippet in on click lister of the button
ShareLinkContent content = new ShareLinkContent.Builder()
.setContentUrl(Uri.parse(copyTextToClipBoard()))
.build();
shareDialog.show(content);