简体   繁体   中英

using facebook in android application to sign in for a site

I used facebook-sdk to integrate facebook in my android app and now I've succeded to login in fb from it. My app works with a website.In order to acces that website u need to be logged into facebook.If u are not logged the website will redirect u to login fb page.

What I wanna do is to login from my app to facebook and join the website in the same time. When I logged into fb I also join the website....no extra things for joinning the site beside login in fb. Could u tell me how to do that. Thx.

EDIT: This the website is something like this: when u try to acces it if u are not signed into facebook it askes u to do that. Once u sign in it display this: http://i56.tinypic.com/2h4m3wk.png And asks for permissions to acces u private information.Once u give it u have automatically created an account to that website...with all the information from FB.

And what I wanna do is to login from my app to facebook and to automaticaly ask me for these: http://i56.tinypic.com/2h4m3wk.png and also automatically have an account on the website.Thank u!

The pictures you show is facebook asking the user to confirm that they wish to use the app and indicates what the app has permission to do with the users profile. The permissions are set by you the developer in your code, for example when i authorise my app and login into facebook i pass the following string private static final String[] PERMS = new String[] { "read_stream","publish_stream", "publish_checkins","user_checkins"}; This is the list of permissions that will appear when the user logs in for the first time.

You can find a list of permissions and what they are used for here. Hope this helps! If you have not setup and registered your app with facebook then this tutorial here will help you.

Hope this helps! Kenny

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM