Facebook登录给我已经授权这个应用程序每次 [英] Facebook login give me already authorized this app everytime

查看:138
本文介绍了Facebook登录给我已经授权这个应用程序每次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Facebook SDK进行Facebook整合工作。我有uibutton,我正在使用它登录到Facebook并在Facebook上分享详细信息



我正在使用FBSession登录

  [FBSession.activeSession openWithCompletionHandler:^(FBSession * session,FBSessionState state,NSError * error){

我可以登录到Facebook ..但是当我尝试分享每次访问授权页面,即使用户有已经授权。我不希望这个页面不是第一次出现。如何确保这个页面不会出现每次用户想在Facebook上分享



在plist文件中,我给了正确的应用程序ID和urlscheme fbappid以及在我的appdelegate我已经添加了handleopenurl,打开会话



解决方案

它是因为您已经在Facebook上为此特定应用程序授予权限。
尝试使用新帐户,您将被要求获得权限。



编辑



尝试使用

 `+(BOOL)openActiveSessionWithReadPermissions:(NSArray *)readPermissions 
allowLoginUI:(BOOL )allowLoginUI
completionHandler:(FBSessionStateHandler)handler;`

使用进入的会话对象completionHandler


I am working on facebook integration using Facebook SDK .. i have uibutton where i am using it to login to facebook and share details on facebook

I am using FBSession to login

 [FBSession.activeSession openWithCompletionHandler:^(FBSession *session, FBSessionState state,NSError *error) {

I am able to login to facebook .. but when i try to share everytime it goes to authorization page even when user has already authorized . i dont want this page to appear other than first time . how to make sure this page doesnt appear everytime user wants to share on facebook

in plist file i have given correct app id and in urlscheme fbappid as well and in my appdelegate i have added handleopenurl , open session

解决方案

Its because you have already given permission for this particular app on facebook. Try using a new account you will be asked for permissions.

EDIT

Try using

`+ (BOOL)openActiveSessionWithReadPermissions:(NSArray*)readPermissions
                            allowLoginUI:(BOOL)allowLoginUI
                       completionHandler:(FBSessionStateHandler)handler;`

use the session object that comes in completionHandler

这篇关于Facebook登录给我已经授权这个应用程序每次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆