I am not able to post Facebook using the custom-ui project of socialauth-android.
Here is the error log.
10-31 13:18:05.124: D/SocialAuthError(21880): org.brickred.socialauth.exception.SocialAuthException: org.brickred.socialauth.exception.SocialAuthException: Status not updated. Return Status code :403
10-31 13:18:05.124: W/System.err(21880): org.brickred.socialauth.android.SocialAuthError: Message Not Posted
10-31 13:18:05.124: W/System.err(21880): at org.brickred.socialauth.android.SocialAuthAdapter$6.run(SocialAuthAdapter.java:868)
10-31 13:18:05.124: W/System.err(21880): at java.lang.Thread.run(Thread.java:818)
I am not able to find the issue. I am using the same API keys got from the Github source.
You are getting 403
Authentication Errorthat clearly means that your app is presently not authorized to publish on Facebook profile of the user.There is some problem the way you are trying to use Facebook APIs. I would suggest you to the latest Facebook SDK for Android as some of the older methods may be deprecated. Let me tell you the approach for doing this right way. (I recently implemented latest Facebook SDK)
There are some specific permissions that you require to do some specific operations with Facebook SDK. For example, You need
publish_actionspermission if you want your app to post status on user's profile.Check Out It says,
For example, the publish_actions permission lets you post to a person's Facebook Timeline.You need to show the user a login button which will ask him to do login with his facebook account and notifying the user what your app may do with his Facebook profile. It will show the permissions. In your case you need to add a login button with
publish_actionspermission. Once the user accepts it, your app becomes authorized to post status.Complete Tutorial is here for doing the login process of Facebook with permissions.
You will need to do the following,
So you can see we are asking the user to give you the publish_actions permission. It is not mandatory to include
user_likesoruser_statuspermissions. You can remove them if you don't need them.After the user logs in, you get an
authentication tokenin yoursessionwith Facebook. So now you can use that to publish on user's profile.Now there are many ways to publish posts or status on Facebook. The first one I would like to discuss is using the
Graph APIHere is somewhat code, you can use to publish to facebook.
NOTE
You do also need to create developer account with facebook and add your app to its dashboard, generate an app_id and mention the same in your
AndroidManifest.xmlfile.