Questions tagged [slrequest]

The SLRequest object encapsulates the properties of an HTTP request, providing a convenient template for you to make requests. You send a request to a social networking service to perform some operation on behalf of the user or to retrieve user information.

The SLRequest object encapsulates the properties of an HTTP request, providing a convenient template for you to make requests. You send a request to a social networking service to perform some operation on behalf of the user or to retrieve user information.

HTTP requests have these common components: an HTTP request method (GET, POST, or DELETE), a URL identifying the operation to perform, a set of query parameters, and an optional multipart POST body containing additional data. The values for these properties depend on the request you are sending and the target service provider. Refer to each supported social networking site’s documentation for possible values. Links to documentation are provided in Table 1.

Use the requestForServiceType:requestMethod:URL:parameters: method to initialize a newly created SLRequest object passing the required property values. Use the addMultipartData:withName:type: to optionally specify a multipart POST body. After you create your request, use the performRequestWithHandler: method to send the request, specifying the handler to call when the request is done.

If you already have a sending mechanism, you can use the preparedURLRequest method to create the request that you send using an NSURLConnection object. If the request requires user authorization, set the account property to an ACAccount object.

Table 1 Social Services Individual Documentation Sites

Facebook    | https://developers.facebook.com/docs/  
Sina Weibo  | http://open.weibo.com/wiki/  
Twitter     | https://dev.twitter.com/docs  

Official page for more info

68 questions
7
votes
4 answers

iOS Twitter Reverse OAuth

I have been pouring over the internet for days now trying to figure out how to implement this. I need to request the access token and secret from twitter in order to pass this to a server that will process the users tweets for my application. I…
Kyle Begeman
  • 7,169
  • 9
  • 40
  • 58
5
votes
2 answers

SLRequest on Twitter give me this: HTTP response status: 403 Error 0error (null)

i'm using SLRequest with twitter, and until a few days ago everything worked fine with the code below but now the response is empty and the error description is null, this is the code i always use: ACAccountStore *accountStoreTw = [[ACAccountStore…
Piero
  • 9,173
  • 18
  • 90
  • 160
4
votes
2 answers

Post to Facebook from iOS app with Swift

So I have been investigating this for quite some time now and have decided to reach out and ask the masses. I know that when posting to Facebook through an iOS app, the app needs to do a read before a write, i.e. Read users email, before posting to…
richari1987
  • 360
  • 2
  • 19
4
votes
0 answers

iOS Twitter api deleting favorites gives error code: 34

I have an application that lets you view your favorited tweets, and it also lets you remove them from favorites if you don't want it anymore. I cannot for the life of me figure out why I am getting this error: 2013-10-13 17:33:57.306…
Kyle Begeman
  • 7,169
  • 9
  • 40
  • 58
4
votes
1 answer

SLRequest - Twitter returns code 215 (Bad authentication data)

I have application with upload photo like in Instagram app. First my app uploads photo and returns link. Then sends link in status message. When I'm testing on my iPhone everything is ok, but when I'm testing on another iPhone then twitter return…
Michal Jurník
  • 820
  • 1
  • 8
  • 23
4
votes
2 answers

Retrieving twitter user data with iOS Social / Accounts frameworks

Is there a way to get user data (first name, last name, and email) from Twitter using the iOS social/accounts frameworks? I'm able to do it with Facebook, but every SLRequest I make to Twitter returns an empty array. Here's the code I've got right…
Bishop
  • 115
  • 1
  • 8
4
votes
2 answers

Accessing Twitter Direct Messages using SLRequest iOS

I need to access the Direct Messages using SLrequest. I got the oAuthToken and oAuthToken Secret using the Reverse oAuth of twitter. Now I need to know how to fetch the direct messages from the https://api.twitter.com/1.1/direct_messages.json url. I…
Raj iOS
  • 1,047
  • 1
  • 9
  • 20
4
votes
0 answers

Login twitter IOS without go to the Settings (like instagram)

I'm newer in twitter integration with IOS So, I have a doubt about that. I saw in many examples on the web that when you don't have an account connected in twitter, you just show an alert and redirect the user to the Setting to login in twitter…
sidneivl
  • 242
  • 3
  • 12
3
votes
2 answers

Use SLRequest to post image in tweet - Image not shown

I'm trying to upload an image (from an iOS device) to a user's twitter account programmatically using SLRequest. The Tweet text is uploaded in the tweet, but the image never appears. The response status code is 200. Obviously the basics work ok,…
TinoK
  • 301
  • 1
  • 9
3
votes
1 answer

How to post image with private tweet using SLRequest in iOS?

I have a problem that I have some followers and I want to send a direct message with image to all followers but I didn't get a way to do that. I study whole documentation but can't find a way to do that. My code is here: NSString *strUrl =…
Mohd Haider
  • 673
  • 1
  • 5
  • 25
3
votes
2 answers

Facebook SLRequest messing with NSURLConnection

I am trying to get facebook data using SLRequest iOS API, which seems to be working fine - NSDictionary *parameters = @{}; NSURL *feedURL = [NSURL URLWithString:@"https://graph.facebook.com/me/home"]; SLRequest *feedRequest = [SLRequest …
2
votes
0 answers

How to share post from background in objective c using facebook

How to implement background share post (image,title) to facebook(without displaying dialog or popup) using objective c
narendrakumar b
  • 115
  • 1
  • 12
2
votes
2 answers

How to post both image and text to twitter with SLRequest class on swift?

func twitterSender(photoImported: UIImage) ->Void { let account = ACAccountStore() let accountType = account.accountTypeWithAccountTypeIdentifier( ACAccountTypeIdentifierTwitter) …
Colin
  • 21
  • 3
2
votes
2 answers

How to get followers and following with Twitter/Social framework in iOS

How can I get all followers and following from a user's Twitter account. I get followers and following counts. However I need usernames of followers and following users. Here my code. - (void) getAccountInfo { ACAccountStore *accountStore =…
renis
  • 171
  • 7
  • 16
2
votes
1 answer

Liking Facebook Page on behalf of user through SLRequest?

I'm currently using SLRequest to allow the user to like our app page in exchange for virtual currency / new character. What parameters do I need to set to allow this? I already have been granted public_actions permission. I found the following, but…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
1
2 3 4 5