Social Auth 4.4 error :: Invalid scopes: publish_stream.

I got this error when I try to connect to a SOCIAL AUTOMATIC CAR . 4.4 INTEGRATE FACEBOOK API IN ANDROID.

A few days ago, everything is working fine, and I can post data to Facebook from my application.

Now I get this error while trying to access Facebook from my application.

Invalid areas: offline_access, publish_stream. This post is only shown to developers. Users of your application will ignore these permissions if available. Read the documentation for valid permissions: https://developers.facebook.com/docs/facebook-login/permissions

After reading the documentation, I found out that the offline_access and publish_stream permissions are out of date, so they can no longer be requested.

So, I replaced the properties file as per the documentation.

publish_stream can be replaced by publish_actions, offline_access is missing.

As 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 

However, I get the same problem. Where exactly did I go missing?

+6
source share
3 answers

Since Facebook has recently changed too many internal settings, it's better to use the Facebook SDK rather than Social Auth

To get started with Facebook sdk you need to create a project in the facebook developer console, kindly see the link below to continue .

One application was created to download and import the latest facebook sdk into your project

After importing, set facebook sdk as a library project for your eclipse

add below code to 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 the application identifier created when creating the project in the developer console

Remember to enable Internet access permissions

then add the following code to your activity

// variables must be declared

  CallbackManager callbackManager; ShareDialog shareDialog; 

// in action oncreate

 FacebookSdk.sdkInitialize(getApplicationContext()); callbackManager = CallbackManager.Factory.create(); shareDialog = new ShareDialog(this); 

// For example, sharing adds the code snippet below to the button’s click list

 ShareLinkContent content = new ShareLinkContent.Builder() .setContentUrl(Uri.parse(copyTextToClipBoard())) .build(); shareDialog.show(content); 
+1
source

Take a look at my answer here:

You should upgrade to the latest version 4.7 ( https://code.google.com/p/socialauth/ ) and repeat the test. I suspect that the permission set is also installed in the code.

What's new in version 4.7?
...
Updated Facebook API v2.2
...

+3
source

I looked at Socialauth sources and I see that you made a small mistake in your properties file. User Permissions Property Must Be Named

 graph.facebook.com.custom_permissions 

not

 graph.facebook.com.custom_permission 

(note the s at the end). I tried this in my project and it works without any problems.

0
source

Source: https://habr.com/ru/post/988131/


All Articles