Facebook Unity SDK ,me?fields=invitable_friends not working on iOS - ios

My facebook sdk 5.1.0, Unity 4.5.2f1
Platform is iOS.
I want invite my facebook friend to use my app just like "Candy Crush Saga" or "FarmVille 2"
can get my all friends ,display them on custom UI and invite them to play app.
But I have problem getting friend list and setting custom UI.
using facebook unity example, it can get friends and send invite, but I can't get these info and it can't custom UI;
when facebook login , i get user_friends permission.
I can't use invitable_friends to get friend list,
but "me?fields=friends" can get friends already use my app.
My login and get invitable_friend code:
FB.Login("email,publish_actions,user_about_me,user_friends,basic_info", LoginCallback);
...
FB.API("me?fields=invitable_friends.limit(10)", Facebook.HttpMethod.GET, InvitableFriendsCallBack);
How do i get friends not play my app then send app invite?
edit:
when login on ios, I get error "FBLogin error".

You can't get friends, who doesn't play your game with iOS game. https://developers.facebook.com/docs/games/invitable-friends/v2.2
The invitable_friends API is only available for games that have a Facebook Canvas app implementation using version 2.0 of the Graph API.
You may use FB.AppRequestto invite friends in game. https://developers.facebook.com/docs/unity/reference/current/FB.AppRequest

Related

How to fetch only WhatsApp Contacts from iPhone Contacts?

How can I fetch only WhatsApp contacts from iPhone contact list using swift.
I fetched contacts information from my phone got following response:
whats app contact
<CNContact: 0x13bd92310: identifier=04B80557-011F-4437-B132-43E2B0D70CD9, givenName=Tech, familyName=.vijaykart, organizationName=, phoneNumbers=("<CNLabeledValue: 0x170661e80: identifier=579A8A18-F113-4C6E-878A-68D18BFE4A8B, label=_$!<Mobile>!$_, value=<CNPhoneNumber: 0x17023f420: countryCode=in, digits=+919791291980>>"), emailAddresses=(not fetched), postalAddresses=(not fetched)>
Non WhatsApp contact
<CNContact: 0x13bd808d0: identifier=E09E916A-7829-4288-8731-A3789FA75F18, givenName=Kcm, familyName=Milk, organizationName=, phoneNumbers=("<CNLabeledValue: 0x174264bc0: identifier=CCF42FEB-2062-4425-81B9-1BF9EABE771C, label=_$!<Mobile>!$_, value=<CNPhoneNumber: 0x17422ddc0: countryCode=in, digits=+919443551702>>"),emailAddresses=(not fetched), postalAddresses=(not fetched)>
But not able to detect if it's WhatsApp contact or not.
Yes according to #Bittoo who have commented above is rit, It is not possible to get only WhatsApp contact, IOS Not allowed you to get others data within the app without the apps permission, if suppose WhatsApp provides their sdk like FB or instagram then it may allowed you through their sdk, if user phone has whatsapp installed, then through their sdk, they may allow you to get their contacts.

URL Scheme to open a post in facebook app

How do I use the url scheme to open a facebook post in facebook ios app?
I got a thing while goolgling like "fb://post/"id""
but it does not work, it just opened the facebook app.
http://wiki.akosma.com/IPhone_URL_Schemes
This "works" but, then again, doesn't:
fb://post/
It only works if the Facebook app has previously loaded the particular post, otherwise it draws a blank.
u can use this link. this might help you
What are all the custom URL schemes supported by the Facebook iPhone app?
fb://profile – Open Facebook app to the user’s profile
fb://friends – Open Facebook app to the friends list
fb://feed – Open Facebook app to the News Feed
fb://events – Open Facebook app to the Events page
fb://requests – Open Facebook app to the Requests list
fb://notes- Open Facebook app to the Notes page
fb://albums – - Open Facebook app to Photo Albums list

iOS Facebook Like Button Not Working With iOS App

Trying to add the Facebook Like Button to an iOS App. Followed the directions online and am seeing an issue.
Without the Facebook App Installed on Simulator (8.x, 7,x):
When pressing the F Like button, we see a transition to Facebook.com but then quickly returns to the iOS App. It does not go to the proper Facebook Like page where the user can like the URL passed.
In the iOS app, the openURL method is being called and the Facebook
wasHandled = [FBAppCall handleOpenURL: url sourceApplication: sourceApplication];
is being called and it returns YES.
Please note that we are also using the Facebook Login Button that is working fine in this app.
The user has already been authenticated with the Facebook Login Button at this point.
Any hints on this would be appreciated.
We are using Facebook iOS SDK 3.21.1
[Addition]
See this article
http://stackoverflow.com/questions/26529314/android-likeview-error
This is what we are seeing in the the URL Error Message in openURL
The like dialog is only available to developers and testers
Which kinda does not make sense? Regular users should be able to see the like dialog to like the item?
For Facebook Like Buttons on iOS and Android.
After you have integrated the latest SDK and you want to test....
1) You must use a Facebook Account that is either the Developer account for the app (the account that the Facebook ID for the app was created) OR a linked tester Facebook account to the Facebook Developer account.
2) You have to use this account to login with on for the App.
3) When testing a "BETA" banner will be on the target page.
4) If these are not in place, for iOS at least you will get an error message in the URL in the openURL routine in the AppDelegate. For Android you will get a "CANCEL" status in your onActivityResult routine.
The like dialog is only available to developers and testers
Hope this helps.
To fully enable the like button for production, please see Ming Li comments above.

I can see/send invites to non-app user friends on canvas app but not on android/ios

I am using the facebook sdk for unity and testing out app requests using the following call:
FB.AppRequest(
FriendSelectorMessage,
null,
FriendSelectorFiltersArr,
excludeIds,
maxRecipients,
FriendSelectorData,
FriendSelectorTitle,
Callback
);
The above call returns a native invite dialog list of all my friends when testing in the canvas version of the app, however when I compile for android/Ios, I only get a list of friends who have played the app??
Is there anyway I can see all friends on ios/android as well?

How to Show Tweet via [MyAppName] in Twitter when I tweet via SLComposeViewController iOS sdk

I have implemented to tweet by default ios sdk using SLComposeViewController ,
But In twitter , Its Shows via iOS by default,
How I can set my Appname, that it will show "via [MyAppName]" in twitter
I have already create app with same name of ios app in twitter and its only 5 character name,
My App is live on app store. Still It doesn't show via[My App name]
Please give feedback of any other suggestion or any idea you have.
I don't think you can do that using SLComposeViewController.
You'll need to have registered an "application" (AKA obtain an API key) on dev.twitter.com to use custom name in "via [MyAppName]" on Twitter.
After that, you can create your own custom view to post to Twitter.

Resources