facebook-sdk-4.0

Error on compile app with Facebook SDK

瘦欲@ 提交于 2019-12-24 02:06:06
问题 I'm trying to integrate Facebook in my AOS app and I'm getting this error that I can't figure out how to fix it. Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 I modified my app | gradle file as

Facebook SDK for iOS: FBSDKShareDialog is not shown

百般思念 提交于 2019-12-24 00:36:54
问题 I am a newbie in iOS, and I would like to share a link using the Facebook SDK for iOS. My code's as follows: @IBAction func shareVoucherUsingFacebook(sender: UIButton) { print("Facebook") let content : FBSDKShareLinkContent = FBSDKShareLinkContent() content.contentURL = NSURL(string: "www.google.com") content.contentTitle = "Content Title" content.contentDescription = "This is the description" let shareDialog: FBSDKShareDialog = FBSDKShareDialog() shareDialog.shareContent = content

Facebook PHP SDK v4.0 FacebookJavaScriptLoginHelper return state NULL

倾然丶 夕夏残阳落幕 提交于 2019-12-23 14:58:11
问题 Im working on my localhost, using FB PHP SDK 4.0. I was able to complete the login using JS SDK, now Im trying to access some info via PHP SDK. On each page I add this js and php code. JavaScipt window.fbAsyncInit = function() { FB.init({ appId : 'app-id', xfbml : true, version : 'v2.1', status : true, cookie : true }); FB.getLoginStatus(function(response) { statusChangeCallback(response); }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id))

Facebook login in Swift 3

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 12:53:33
问题 Hi I'm having a problem with FBLogin in Swift It always displays "User cancelled login." in iOS8.2 and "Falling back to storing access token in NSUserDefaults because of simulator bug" when I use iOS10.1 Do you have any suggestions regarding this issue? 回答1: I solved this issue by adding these functions in my AppDelegate.swift @available(iOS 9.0, *) public func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return

How to opt out from Facebook SDK event logging?

送分小仙女□ 提交于 2019-12-23 06:48:14
问题 I'm using Facebook App Events tracking for Android, but I have no idea how to disable tracking when a user wants to opt out! Does anyone know how to do that? The documentation says: We recommend that you use our SDK tools to offer the opt-out. But they don't actually describe it anywhere. Classic Facebook move. EDIT: Now with the GDPR being in effect for so long, they still don't have any way to disable all tracking until the user consents, do they? 回答1: Don't know about per User, but you can

how to get location of facebook user using Graph API for android

纵然是瞬间 提交于 2019-12-22 17:45:31
问题 I am able to get name,email,gender and birth date using the following code loginButton.setReadPermissions(Arrays.asList("public_profile, email, user_birthday, user_friends,user_location")); //I also added user_location loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(LoginResult loginResult) { // App code GraphRequest request = GraphRequest.newMeRequest( loginResult.getAccessToken(), new GraphRequest.GraphJSONObjectCallback()

Google Play URL messes up Facebook's share dialog

一曲冷凌霜 提交于 2019-12-21 09:17:57
问题 I am trying to share an image with title and description on Facebook but it looks like when I set a Google PLay URL as the ContentUrl then the title and description are not displayed. This is my code: if (ShareDialog.canShow(ShareLinkContent.class)) { ShareLinkContent linkContent = new ShareLinkContent.Builder() .setContentTitle("I want this car") .setContentUrl(Uri.parse("http://www.producthunt.com")) .setImageUrl(Uri.parse("http://www.topgear.com/uk/assets/cms/50b95ad3-7884-4b3d-ba3c

FBSDK Login Error Code: 308 in Objective-C

时光总嘲笑我的痴心妄想 提交于 2019-12-20 08:35:04
问题 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. 回答1: 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

FBSDK Login Error Code: 308 in Objective-C

无人久伴 提交于 2019-12-20 08:32:26
问题 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. 回答1: 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