Before you all say it's not possible, open up the Spotify app and hit the signin with Facebook button.
I'm wondering how they did it, and how I can get "publish_stream" and basic permissions/email in one request.
Also, is it possible for me to reopen a Facebook session using the Facebook SDK if I have certain info from the last session (last time they used the app)?
EDIT -SCREENSHOTS BELOW FOR THE MUSICALLY AVERT
Go to your application dashboard. then click edit app. now in left side of the page u will see
Permission
. click it. a new page will come. find outUser & Friend Permissions:
box. here typepublish_actions
. now save.now from your android app you can post story to facebook by login just once. i mean, just login using
LoginButton
,and try to post something. it should work.let me know what happen.
In my app I have created an instance for OpenRequest and I have set permissions for it.
It may be useful to you.
I just set it separately in the onCreate Method.
For anyone that is wondering about the second part of my question:
To reopen a Facebook session using the Facebook SDK use this code
Facebook caches the token.
What ever you saw on Spotify is not the outcome of
publish_stream
.What they have used is the Open GraphOpen graph concepts involves integrating actions of the app with the FB activity post and share with the users through the application they use. Read more about it at the above mentioned link.
Edits Explanation: Check the Open Graph Permissions
Sample Activity:
This activity will show this (if the user is not logged in):