facebook-unity-sdk

Facebook AppRequest handle on unity3d game

北城余情 提交于 2019-12-04 14:10:43
I am trying to make a game in Unity3D with new facebook unity sdk. I am able to send an AppRequest to the friends in my list. But my doubt is, after my friends has downloaded the same game, how can I communicate with friends using the AppRequest. For eg. If I am sending a "Life" to the friend, my friend should see a "Life" sent from me in his game. his "Life" counter should get incremented by 1 (life++). Same thing with "Ammo" can be done. Sender : How to differentiate the "Life request" and "Ammo Request". Receiver : In game, how to get that request and differentiate it, so that "Life" or

facebook unity sdk 6.0 crash app at second login

淺唱寂寞╮ 提交于 2019-12-04 07:23:00
Created a simple app with facebook unity sdk 6.0. In start function call the init facebook. There is a button call login and the login callback just output string. Run on a Samsung galaxy s5 with android 4.4.2. Issue (100% repeatable): 1. First time click login button, get the facebook login screen. 2. Click exit button, back to app. 3. Click login button again, app crashed. Crash dump: W/dalvikvm(16020): threadid=1: thread exiting with uncaught exception (group=0x417f3da0) V/SmartFaceService - 3rd party pause( 704): onReceive [android.intent.action.ACTIVITY_STATE/com.xxxxx.testfacebook/create

How to get user's profile picture with Facebook's Unity SDK?

自作多情 提交于 2019-12-04 07:12:11
I'm trying to get the profile pic of the user of the game using this- void MyPictureCallback(FBResult result) // store user profile pic { if (FB.IsLoggedIn) { WWW url = new WWW("http" + "://graph.facebook.com/" + FB.UserId + "/picture"); Texture2D textFb2 = new Texture2D(128, 128, TextureFormat.ARGB32, false); //TextureFormat must be DXT5 url.LoadImageIntoTexture(textFb2); profilePic.renderer.material.mainTexture = textFb2; } But it isn't working. I am getting no errors. Jason Pietka's answer is OK but a bit old. Today we us FB.API : FB.API("me/picture?type=med", Facebook.HttpMethod.GET,

Error: The prefix “tools” for attribute “tools:overrideLibrary” associated with an element type “uses-sdk” is not bound

▼魔方 西西 提交于 2019-12-04 01:39:57
I got the following error while build apk file from unity on mac osx sierra. this also build fine before I reboot my macbook, but not now. I've added error details below: Note: I'm using facebook sdk. Error: Error while saving blame file, build will continue Error: The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "uses-sdk" is not bound. UnityEditor.HostView:OnGUI() and: AndroidSDKToolsException: Unable to merge android manifests. See the Console for more details. UnityEditor.Android.AndroidSDKTools.DetectErrorsAndWarnings (System.String logMessages,

Unity facebook SDK, can not post picture with FB.Feed

谁说胖子不能爱 提交于 2019-12-03 15:07:23
In my Unity IOS game, I am unsuccessfully trying to use FB.Feed to share a screenshot on the user's wall. Facebook documentation uses FB.Api to publish the screenshot , but this method does not display a share dialog, it simply uploads the pic to Facebook. Answers I have found so far: Upload the picture using FB.Api, and then parse the FBResult for the picture URL, and feed that to FB.Feed Link to answer . This method triggers an error, since it is not possible to use a Facebook URL as source for a picture. Save the picture locally and prepend "File://" to the picture path. Link to question .

Facebook Unity Sdk v5.0.3 crashes in Landscape mode when trying to login - Android

天大地大妈咪最大 提交于 2019-12-01 09:22:49
问题 The game crashes when I click at login button as the game is in landscape mode. If I use portrait mode, everything works fine and correctly. I got the following stack trace from bugsense when I got the crash. java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.adssdk.plugins/com.facebook.unity.FBUnityLoginActivity}: java.lang.UnsupportedOperationException: Session: an attempt was made to request new permissions for a session that has a pending request. 1at android.app

Workaround for Unity5 iOS compile error with facebook-unity-sdk 6.2.1

牧云@^-^@ 提交于 2019-12-01 00:54:14
i am getting these errors when i try to compile on iOS: on ios: FBLinkShareParams *dialogParams = [[[FBLinkShareParams alloc] init] autorelease]; /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:561:73: 'autorelease' is unavailable: not available in automatic reference counting mode /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:662:15: No known class method for selector 'publishInstall:withHandler:' now these don't seem to be that much of a problem, so is there any Facebook developer here who can give

Workaround for Unity5 iOS compile error with facebook-unity-sdk 6.2.1

ぃ、小莉子 提交于 2019-11-30 19:33:14
问题 i am getting these errors when i try to compile on iOS: on ios: FBLinkShareParams *dialogParams = [[[FBLinkShareParams alloc] init] autorelease]; /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:561:73: 'autorelease' is unavailable: not available in automatic reference counting mode /Users/Daniel/Repositories/Unity5/FacebookTest/Assets/Facebook/Editor/iOS/FbUnityInterface.mm:662:15: No known class method for selector 'publishInstall:withHandler:'

Upload picture to facebook from unity

安稳与你 提交于 2019-11-30 15:25:27
Im working on a unity game where you can take a picture and upload this picture to facebook from unity along with some tags and stuff (much like friendsmash). The problem is that i do not have a web-server that i can put the screenshots on, and the Fb.Feeb(picture:) attribute only accepts urls. I have read that you can use HTTP POST to post the picture to the users images and then use that link in picture:, but i dont know anything about HTTP POST and i couldnt figure out how to do it. I have also read that you can use FB.API() to somehow do this, but i couldnt figure it out. Any sample code

FB.Logout() not working in Facebook UnitySDK

强颜欢笑 提交于 2019-11-30 09:20:47
问题 I've managed to successfully log in FB using FB.Login function. Now I want to log out: FB.Logout(); Debug.Log("FB IS LOGGED IN " + FB.IsLoggedIn); I am expecting the above code to print the value of FB.IsLoggedIn as false and to ask me for a login and password on the next FB.Login . In fact the value of FB.IsLoggedIn is true and I am not being logged out: next call to FB.Login does not ask for password and I am not being logged out when I open facebook site in my browser. I've also tried to