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
0
votes
0 answers

How i can use Twitter Session For SLRequest.account as ACAccount

I am using SLRequest for post video on twitter.The problem is that when i add my account to twitter App from setting then my code works after fetching account using ACAccountStore(). I am using twitter kit on my app, and also i have user session on…
ZAFAR007
  • 3,049
  • 1
  • 34
  • 45
0
votes
2 answers

System hangs when showing a UIAllertView inside a SLRequestHandler

I am using SLRequest to send user's video to twitter. After finishing the post request, I want to inform the user whether the upload is successful. But if I show a UIAlertView inside the SLRequestHandler, the system simply hangs and doesn't show the…
Thinium
  • 171
  • 1
  • 14
0
votes
1 answer

iOS SLRequest Twitter search credentials access error

My app uses the integrated Twitter APIs on iOS to receive data from the Twitter REST API. The /1.1/friends/list.json and /1.1/users/lookup.json endpoints work perfectly on all devices, but the /1.1/users/search.json endpoint gives a credentials…
Remco Beugels
  • 1,153
  • 1
  • 12
  • 21
0
votes
1 answer

set a variable of int into a variable of [NSNumber : Int]

I am having trouble of using the parameters in SLRequest for Twitter (as it must be a type of [NSObject : AnyObject]!, yet the Twitter API requested Int as parameters). What I do is leaving the parameter constant as [NSObject : AnyObject] and…
Ronald Aja
  • 139
  • 1
  • 2
  • 8
0
votes
1 answer

Twitter SLRequest Authentication Error

I have been trying to retrieve twitter user data utilizing the built in iOS Accounts and Twitter frameworks. I am getting access to the user account on the phone successfully. However, when making the SLRequest to twitter I receive an non…
wambambizzle
  • 105
  • 7
0
votes
1 answer

iOS7 Access user Facebook Profile Picture

So i'm trying to get a users Facebook profile image using SLRequest. I feel like I've scoured the entire internet to no avail and am at my wits end. Here's the dilemma... Version 1 of the code: let store = ACAccountStore() let type =…
George Green
  • 4,807
  • 5
  • 31
  • 45
0
votes
1 answer

SLRequest get image Headers(width and height) without downloading

i am creating cells with width and height of UIImage. i am getting the images from Facebook post OR twitter Feed. Currently i just can set the cells size AFTER downloading the image and this leads to delaying. So my question is: is it possible to…
brush51
  • 5,691
  • 6
  • 39
  • 73
0
votes
1 answer

Why don't my parameters get sent in my SLRequest?

I'm working with Twitter's API, and the parameters I try to send along an SLRequest seem to be ignored: SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:[NSURL…
P. Unto
  • 236
  • 1
  • 11
0
votes
1 answer

Error 32 from Twitter request using SLRequest with parameters

I'm trying to make a twitter request using SLRequest but whenever I include parameters in the request, the response I get back is {"errors":[{"message":"Could not authenticate you","code":32}]}. If I don't include parameters the request works as…
Matt Donnelly
  • 417
  • 1
  • 4
  • 6
0
votes
1 answer

Check if Authenticated User Likes A Certain Page (Using SLRequest)?

I've been looking through the open grpah reference docs, and can't seem to find a good example related to SLRequest regarding users and whether they like a certain page or not. I don't want to iterate through their entire list of likes. I was…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
0
votes
1 answer

Attaching a URL to a facebook post using SLRequest?

I'm successfully able to post to facebook using SLRequest, in the following way: - (void)postScoreWithFBAccount:(ACAccount *)facebookAccount { NSString *messageToPost = [self.myString stringByAppendingString:@"https://www.example.com"]; …
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
0
votes
2 answers

SLRequest twitter access now requires SSL

-(void) vSLRequest:(SLRequest*) SLRequest1 WithHandler:(NSString *) errorTitle andD1: (NSString *) errorDescription FP1:(NSString *) errorParse FP2:(NSString *) errorParseDesc ifSuccess:(void(^)(NSDictionary * resp))succesBlock { [self…
user4951
  • 32,206
  • 53
  • 172
  • 282
0
votes
2 answers

Why when I add items to Core Data after the app loads do they not show up until I tap on the cell? (Then only that one shows.)

Example project showing issue: http://d.pr/f/g8x5 I'm building an app that interacts with the Twitter API on iOS (using the native OS access, not through the web API). I send the items to Core Data which then should show up in my…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
0
votes
3 answers

How to get the facebook profile picture in large size using SLRequest?

I have used the SLRequest for getting profile info and i followed the Getting user profile picture in iOS6? to get the profile image. But it returning 50x50 image dimension. I need large size of profile picture. Can anyone give me some idea to do…
Surfer
  • 1,370
  • 3
  • 19
  • 34
0
votes
1 answer

Update textfield in uitableviewcell after slrequest performrequestwithhandler stall with twitter handle

I am trying to pull a user's twitter handle and populate it into a textfield in a tableview. The request completes successfully and calls the execution block, but the UI takes several seconds to update. I've tried using NSNotifications to trigger…