Questions tagged «facebook-sdk-4.0»

10
Android Facebook 4.0 SDK如何获取电子邮件,用户的出生日期和性别
我正在使用以下代码。我想要用户的出生日期,电子邮件和性别。请帮忙。如何检索这些数据? 这是我onViewCreated()里面的碎片。 @Override public void onViewCreated(View view, Bundle savedInstanceState) { // Setup TextView. mTextDetails = (TextView) view.findViewById(R.id.text_details); // Set up Login Button. LoginButton mButtonLogin = (LoginButton) view.findViewById(R.id.login_button); // setFragment only if you are using it inside a Fragment. mButtonLogin.setFragment(this); mButtonLogin.setReadPermissions("user_friends"); mButtonLogin.setReadPermissions("public_profile"); mButtonLogin.setReadPermissions("email"); mButtonLogin.setReadPermissions("user_birthday"); // Register a callback method when Login …

6
适用于Android的Facebook SDK 4-如何以编程方式注销
最近,Facebook发布了SDK 4,其中包含新的更新。我试图切换到SDK4以使用新功能,但是,我在Facebook的登录功能方面苦苦挣扎。 到目前为止,以编程方式注销Facebook时,我使用了: Session session = Session.getActiveSession(); session.closeAndClearTokenInformation(); 但是SDK4似乎不再支持Session,在官方文档中,他们提到: 有两种方法可以在Android上实现Facebook登录: LoginButton类-提供可以添加到UI的按钮。它遵循当前的访问令牌,并且可以登录和注销人员。 好吧,除了使用LoginButton,似乎没有办法以编程方式注销Facebook。任何人都有任何想法,请在这里分享。

14
iOS iOS SDK 4.0登录错误代码304
我刚刚更新了Facebook SDK v4.0 并按照使用自定义登录界面的教程进行操作 -(IBAction)facebookLoginClick:(id)sender { FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login logInWithReadPermissions:@[@"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { if (error) { // Process error } else if (result.isCancelled) { // Handle cancellations } else { // If you ask for multiple permissions at once, you // should check if …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.