facebook-sdk-4.0

FBSDK Login Error Code: 308 in Objective-C

让人想犯罪 __ 提交于 2019-12-02 16:05:20
I keep getting "Error Domain=com.facebook.sdk.login Code=308 "The operation couldn’t be completed. (com.facebook.sdk.login error 308.)"" upon trying to login with Facebook from my device. My code works on the simulator, but not on an actual device. Has anyone ran into this error code before? I'll be more than happy to share code upon request. One solution, at least for me, is to not run on device via the Xcode debugger. If I run the app on device outside the debugger the Facebook login works fine. If I run the app in the sim via the debugger the Facebook login works fine. Only if I run the app

Open Facebook Messenger in Android

核能气质少年 提交于 2019-12-02 14:45:48
I want to open facebook messenger by code. How I can get the facebook ID?? I have the facebook SDK on my app and I saved for every user the facebookId but is not the same as I need Here is my method: // Make sure the Facebook Messenger for Android client is installed boolean isFBInstalled = isAppInstalled("com.facebook.orca"); if (!isFBInstalled) { Toast.makeText(this,"Facebook messenger isn't installed. Please download the app first.", Toast.LENGTH_SHORT) .show(); } else { // Create the Intent Uri uri = Uri.parse("fb-messenger://user/"); uri = ContentUris.withAppendedId(uri,Long.valueOf

Post Id facebook share dialog always return null in Android

不羁的心 提交于 2019-12-01 16:45:15
I used test app id and log on by test user create at dash_board app on facebook develop site, require pulish_actions permission when login using login button widget of facebook sdk but result get postid always = null. Here is my code: .... shareDialog = new ShareDialog(MainActivity.this); shareDialog.registerCallback(callbackManager, new FacebookCallback<Sharer.Result>() { @Override public void onSuccess(Sharer.Result result) { if (result.getPostId() != null) Log.e(TAG, result.getPostId()); } @Override public void onCancel() { } @Override public void onError(FacebookException e) { } });

NullPointerExcepetion Facebook sdk v4.5.0 when enable Proguard (when try to login using Parse library)

China☆狼群 提交于 2019-12-01 15:23:45
I'm trying to login with Facebook using ParseFacebookUtils library and it's working good but when i enabled the Proguard file i have this exception on Facebook login activity startup: Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{my.package.name/com.facebook.FacebookActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471) at android.app.ActivityThread.access$900(ActivityThread.java:175) at android.app.ActivityThread$H

Get Access Token programmatically in Unit Test Method

若如初见. 提交于 2019-12-01 10:13:24
问题 First, I open Facebook Developers page, and I create new App. ( I get AppID, AppSecret values) I want create Unit Test method for do Post to the wall, and later delete the post. publish_stream, publish_actions Manually , I do this 3 steps Open url https://graph.facebook.com/oauth/authorize?client_id=xxxxx&redirect_uri=http://www.kiquenet.com/&scope=publish_stream,publish_actions Then, this url opened, and I get the code value : http://www.kiquenet.com/?code=A....3qhOw#= And then, open this

How to update FBRequest.requestForMe() on facebooksdk v4.0.1?

廉价感情. 提交于 2019-12-01 09:03:06
So, I made application on iphone. I'm using login with facebook and currently upgrade my facebooksdk to lastest version. Some of my code happen to have an error. Below is mycode: let request = FBRequest.requestForMe() request.startWithCompletionHandler({ (connection, result, error) -> Void in if error == nil { if let userData = result as? NSDictionary { let facebookId = userData["id"] as! String self.user.name = userData["name"]as! String // self._fbuser.location = userData["location"]["name"] as String self.user.gender = userData["gender"] as! String self.user.imgUrl = NSURL(string: NSString

Description not shown in Facebook ShareDialog

女生的网名这么多〃 提交于 2019-12-01 08:07:00
I am trying the ShareLinkContent using the ShareDialog from Facebook in my Android App. Following is the code snippet I have used. I have the content title and the description as it is needed for the post. It is fine while is show in the mobile while I try to post it.But When I see the post in the facebook it is different. Hope it is picking it from the google play store. Please help to resolve this s that I can see the description and the tilte that I have set it in the share dialog @Override public void facebookShare(String msg) { if (ShareDialog.canShow(ShareLinkContent.class)) {

Android. Send text to facebook messenger by Facebook SDK 4.X

血红的双手。 提交于 2019-12-01 05:56:00
As document from facebook, we can send image from android app to facebook messenger like below. String metadata = "{ \"image\" : \"trees\" }"; ShareToMessengerParams shareToMessengerParams = ShareToMessengerParams.newBuilder(contentUri, "image/jpeg") .setMetaData(metadata) .build(); // Sharing from an Activity MessengerUtils.shareToMessenger(this, 0, shareToMessengerParams); But I want to send just text. So I tried below. ShareToMessengerParams shareToMessengerParams = ShareToMessengerParams.newBuilder(null, "text/plain") .setMetaData("text to send") .build(); // Sharing from an Activity

Could not initialize LoginButton Facebook-sdk for android

流过昼夜 提交于 2019-12-01 04:03:16
im working on an android project an i want to put a Facebook Login feature, i added the Facebook sdk Correctly but i could not initialize LoginButton **java.lang.NoClassDefFoundError: Could not initialize class com.facebook.login.widget.LoginButton** at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org

Android. Send text to facebook messenger by Facebook SDK 4.X

廉价感情. 提交于 2019-12-01 03:52:43
问题 As document from facebook, we can send image from android app to facebook messenger like below. String metadata = "{ \"image\" : \"trees\" }"; ShareToMessengerParams shareToMessengerParams = ShareToMessengerParams.newBuilder(contentUri, "image/jpeg") .setMetaData(metadata) .build(); // Sharing from an Activity MessengerUtils.shareToMessenger(this, 0, shareToMessengerParams); But I want to send just text. So I tried below. ShareToMessengerParams shareToMessengerParams = ShareToMessengerParams