Facebook make a friend request on iOS / API call - ios

Is there any API call that I can use in order to send a friend request ?
I have seen some applications that allow you to do that, so I have been wondering
how that has been achieved. I can't find anything useful in the documentation.
(all the answers I found are quite old)

Use one of the presentDialogModally methods in FBWebDialogs and pass it the session and #"friends" as the dialog param.

Related

How to invite Facebook friends from iOS app?

The current solution I found involves a complex set of process, I have not figured out 100% yet. Thus, I wanted to know an expert opinion on this.
This is what I have so far:
Access Graph API endpoint /friends which will give the list of friends who are also using the app
Invite them (I have no idea how)
For an invite, I have found this, but that's already deprecated. Which uses FBSDKAppInviteDialog.
I also found this but it seems like she is just promoting their own product. If they can do it then there must be a way for me to achieve this as well. Still, I can't find it in Facebook docs.
The sad thing is, why would Facebook make this simple stuff very hard to do?

How can I filter the friends returned from a facebook graph API request?

I need to retrieve all facebook friends which match some sort of filter or pattern. I am currently calling this:
me/friends?fields=name,id
This returns all friends which have also downloaded my app. However, is there a way to filter the returned friends by name? I want to avoid retrieving all friends and then filtering the results on the client side to minimise the size of the result since there could be a lot of results. I know that FQL supported this, but it has been deprecated in favour of the graph API, however despite looking around everywhere I am surprised to not have found an answer to what I thought would be a pretty common requirement.
To give a bit of context, I'm simply providing the user with a text field with which they can filter their friends, and so want to make requests on the graph API like this:
me/friends?fields=name,id&name=%Pat%
Thanks
Facebook SDK gives you the option to retrieve either the friends that use the application or the one who haven't downloaded it yet (for invitation purposes etc.)
However, if you would like to filter them you will have to do it in the FE. Facebook SDK doesn't support such functionality yet.
Cheers

Twitter count with the new Twitter update

As of today, its not possible to fetch tweet counts. You can read more here:
https://blog.twitter.com/2015/hard-decisions-for-a-sustainable-platform
So almost all scripts/plugins wont work anymore. What would be best alternative solution with the new twitter buttons/updated API, if such exists?
For example, is there a callback, once user successfully shares something? Because i could use that to increase tweet count in my own database? So saving them locally.
To answer my own question based on findings:
For now its possible via http://opensharecount.com, they provide a drop-in replacement for the old private JSON URL based on searches made via the API (so you don't need to do all that work).
It's based on the REST API Search endpoints.

API to post on Tumblr

I've been trying to upload an image to Tumblr from my iOS application for a little while now, but I can't get my method to work properly.
My current method uses ASIHTTPRequest and OAuthConsumer according to this guide.
However, I end up getting a 401 error (Authentication needed).
You can find the explanation for my problem here.
But my question is : Is there any other mean/API to post on Tumblr for iOS?
I saw that OAuthConsumer was not fully functional on that side, and I didn't find anything with the GTM.
Thanks.
Finally found a solution to my problem a few time ago.
I first thought that it was a bit old and that it wouldn't work but in the end, implementing the TumblrUploadr did the thing.
To sum it all, I achieved login with GTM-OAuth and uploading with TumblrUploadr. For those who seek a solution to the Tumblr API.
Update : Some info concerning GTMOAuth, if you want to use the callback, you have to add a flag in the GTMOAuthAuthentication.m > +(NSArray*)tokenAuthorizeKeys : add kOAuthCallbackKey in the array so that it will be taken into account. Else, you have no callback.

Inviting Users to Events via Facebook API

I'm able to create an event via the Facebook Graph API but I have yet to see a way in which to invite users to that event.
My fallback is to simply use the old REST API but sooner or later that will be phased out so I wanted to see if anyone had any suggestions.
--
Additional side question:
While using the REST API (or possibly even the Graph API) I have not found a way to invite guests who are not on Facebook. Is there a way to do this?
--
Thanks in advance for your help.
The bad news is that I think you're stuck with the REST API, at least I couldn't find another way (see http://bugs.developers.facebook.net/show_bug.cgi?id=10070 if you haven't already). The good news is that there's still so much functionality missing from the graph API that I'm pretty sure Facebook isn't going to be phasing it out any time soon. Very frustrating though...
can I use the JavaScript SDK to call the old REST API method ?
JS SDK

Resources