从 iPhone 应用程序获取无限 FB 会话密钥
我有一个 iPhone 应用程序,它使用 FBConnect 来登录用户并获得一些扩展权限。现在我需要一个无限的 FB 会话密钥来在用户墙上发布一些信息,并且我正在尝试获取离线访问扩展权限,但这似乎不起作用。
FBPermissionDialog 甚至没有在页面上显示离线访问权限,这有点令人担忧。我尝试了这个 http://kokx85.blogspot.com/ 2010/05/iphone-extend-multiple-permission-from.html 没有运气,因为在我的 PHP 应用程序中使用时,我从 FBSession 对象返回的会话密钥显示“会话密钥无效或不再有效” “
您可以在下面找到 OBJ-C 代码。
- (void)session:(FBSession*)session didLogin:(FBUID)user_id {
self.usersession = session;
NSLog(@"User with id %lld logged in.", user_id);
if( !resume_session ){
FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease];
dialog.delegate = self;
dialog.permission = @"offline_access,email,user_birthday";
[dialog show];
}
else{
[self getFacebookName];
}
}
I have an iPhone application which uses FBConnect to log the user in and also get some extended permissions. Now I need an infinite FB session key to post some info on the user's wall and I am trying to get the offline_access extended permission which seems to be not working.
FBPermissionDialog is not even showing that offline_access permission on the page which is a bit worrying. I tried this http://kokx85.blogspot.com/2010/05/iphone-extend-multiple-permission-from.html with no luck as the session key I'm getting back from the FBSession object when used in my PHP application shows "Session key invalid or no longer valid"
You can find the OBJ-C code below.
- (void)session:(FBSession*)session didLogin:(FBUID)user_id {
self.usersession = session;
NSLog(@"User with id %lld logged in.", user_id);
if( !resume_session ){
FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease];
dialog.delegate = self;
dialog.permission = @"offline_access,email,user_birthday";
[dialog show];
}
else{
[self getFacebookName];
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论