how to post on friends timeline on iPhone app - ios

My underlying goal is to allow the user of my app to invite a facebook friend to also use the app, by either posting a story to that friend's timeline, or by sending them a private message.
My hope is to do so using the iOS Social Framework exclusively.
My immediate questions are twofold:
Can you use the SLComposeViewController to post to a friend's wall, or is that limited to only posting to the app user's wall?
If SLComposeViewController cannot be used to do that, then what is the recommended method for doing so (again, within the social framework)?

Related

Invite Facebook friends to my iOS app that is not a game with custom UI

I want to invite Facebook friends the way Rounds iOS app work (i.e. show the list of Facebook friends in native UI and once the user taps 'Send Invites', i show the Request Dialog with the select friends and the user only press send to send the invites). This can be done using
FBWebDialogs.presentRequestsDialogModallyWithSession(
nil,
message:"Message",
title:nil,
parameters:["app_id" : APP_ID, "to" : FRIENDS_IDs]) {
result, url, error in
//Do whatever
}
The problem here is that the only two ways i can use to get the friend ids is:
1- making a graph request using /me/invitable_friends which is avaiable only for games.
2- the other is to use /me/friends BUT it returns only the friends that have authorized your app not the complete list of friends.
What i want to do is already done in another app called Rounds and also it is not categorized as game.
https://developers.facebook.com/docs/apps/faq#invite_to_app
You are supposed to use the Message Dialog on iOS to invite friends. There is no need to get the whole friendlist for that, the user can just select his friends in the Dialog. You can´t get the whole friendlist anyway if your App does not have a Canvas implementation and if your App is not a game. Of course there´s also taggable_friends, but that one is for tagging only.
Btw, those other Apps where this works are most likely old v1.0 Apps. It will stop working for them after April 2015.

How to fetch Facebook user's full friend list in Facebook iOS SDK

I had a question concerning the Facebook iOS SDK that has been troubling me ever since i started my iOS project so I thought I could post it here to see if any of you had wisdom to share on this matter.
For my Facebook connected app to function properly I need to have access to the Facebook user's complete friend list along with their names, ids and profile pictures. After some intensive research I was surprised to learn that in version 2.0 of the Graph API Facebook has made it so that you can only retrieve a friend list of your friends who are currently using the app and have approved the app. This kind of data doesn't really work for my app as the main point is that you are met by your friend list as opposed to an empty list with only a few people who have approved the app.
My question is if there is any possible way for me to have access to the user's full friend list and display it in a table view with their profile picture without every single one of them having to approve the app. I don't mind if it is a complicated solution. The reason I ask this is because i have seen several apps that can fetch full friends lists such as:
http://www.connect.com
and
http://www.birthdayboardapp.com
and they must have found a way to do it as the way Connect displays the user's friend list is exactly the way I would like to do it i.e. in an iOS contacts app style way.
I would be grateful for any guidance or solutions,
Thanks Again!
P.S. Here are some questions I have previously looked at but do not suggest possible workarounds
Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
Get ALL User Friends Using Facebook Graph API - Android
There are no workarounds, if it works in some other App then it just means that they are still using a Facebook App created before end of April 2014. They will stop getting the full friendlist after April 2015, when v1.0 Apps will get upgraded.
There are ways to get the whole friendlist like invitable_friends and taggable_friends, but those endpoints are supposed to get used for very specific tasks (for inviting in games and for tagging).

Initiate Facebook Group Chat from iOS App

I want my app to create a new Facebook group chat with certain people that opens either on Facebook's site in Safari or in the native Facebook app when the user presses a button. I want Facebook to handle the whole chat and my app only to initiate it somehow in the cleanest and least involved way possible. My app already uses the Facebook SDK to open an active FBSession, so I've already got login credentials.
Looking around online and in Facebook's docs, I can't find anything that suits my needs. The closest thing I found was in this answer containing a list of Facebook app URLs you can connect to that open the Facebook app to certain pages. There's "fb://chat/(initWithUID:)" and "fb://messaging/compose/(initWithUID:)". However, not only is there no explanation on how to use these, but people say that Facebook has changed these URLs (and does not have any documentation on them), so they don't work anymore unless I reverse-engineer new URLs (which could change again). Ugh, so close!
I also found examples on starting chats with the Facebook Chat API, but that involves logging into Facebook using some networking framework then writing my own GUI and model for sending messages, which I am only prepared to do as a last resort. There should be some way to let the Facebook app or website do all that. Does anyone know how I can do this?
I've found something very close, but I still don't see a way to make my app initialize it with the desired group of friends:
The Facebook SDK has a message dialog that can appear for sending messages to friends. This isn't exactly what I wanted but is good enough because it means that all the programming is already done for me by Facebook, and users should be able to see these messages on https://facebook.com and the Facebook apps. https://developers.facebook.com/docs/ios/share#message-dialog

SLComposeViewController Facebook posts as iOS instead of Facebook Application Identifier

I'm currently working on a prototype for adding Facebook social features for future iOS games. One of the features I've been working on involves using the new native Facebook Composer to post to a link to the game, and then tracking the post and giving the player coins for every person who likes the post. After the post, I get their feed and look for a post with a matching application ID. I've already got that part working correctly if I don't use the new native Facebook Composer (either old style dialogs, or just a direct post with no dialog).
The problem I'm encountering is when using the new SLComposeViewController, the post will appear to come from the application "iOS" id "213546525407071" rather than the id for my application.
Is there a way to change the attributed application so that it uses my application ID instead of iOS?
That's how SLComposeViewController works. If you want your own app designated, you have to design your own UI and use FBRequestConnection from the Facebook SDK as discussed here.

Apple game center and Facebook finding friends iOS6

I'm mainly looking to clarify the following:
1. I've been told that with iOS 5 and below, if you use Game Center to setup a multiplayer game, the functionality to 'find Facebook friends' (like in scramble with friends) is not built-in so you need a separate server of the sort to manage this action - is this correct?
As per iOS docs:
The Social framework (Social.framework) provides a simple interface for accessing the user’s social media accounts. This framework supplants the Twitter framework that was introduced in iOS 5 and adds support for other social accounts, including Facebook and Sina’s Weibo service. Apps can use this framework to post status updates and images to a user’s account. This framework works with the Accounts framework to provide a single sign-on model for the user and to ensure that access to the user’s account is approved.
The UIKit framework also provides a new UIActivityViewController class for displaying actions that the user might perform on some selected content. One use of this class is to allow the user to post content to social accounts, such as Twitter or Facebook. You present this class modally on iPhone or using a popover controller on iPad. When the user taps one of the buttons, the view controller presents a new interface to perform the associated action.
For more information about the Social framework, see Social Framework Reference. For information about the UIActivityViewController class, see UIKit Framework Reference.
Ref:
https://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS6.html#//apple_ref/doc/uid/TP40011812-SW1
2.
Judging by above it appears that the 'find Facebook friends' operation is built into Game Center in iOS 6 - is this correct?
Thanks.
Unfortunately, the functionality as you describe (finding facebook friends to connect multiplayer matches) does not exist on iOS6, at least not yet.
What is included is a bit different and a lot less exciting. If you go to the Game Center application on your device, you now get a "suggested friends" list that is generated from your facebook friends and the contacts on the device.
getting the facebook friend matching functionality still requires you to set up your own servers sadly.

Resources