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
2
votes
1 answer

How to get user info who is getting sign in using twitter SLRequest?

I would like to get user profile information using SLRequest in twitter? Currently I am coding like NSURL *url = [NSURL URLWithString:@"https://api.twitter.com/1.1/users/show.json"]; NSDictionary *params = [NSDictionary…
Chatar Veer Suthar
  • 15,541
  • 26
  • 90
  • 154
2
votes
1 answer

Permission Alert in iOS when making networking request

When making a networking request using the ACAccount and SLRequest objects in iOS, an alert appears when the app runs that asks X app would like access to Twitter accounts with buttons for "Don't Allow" and "OK. Where does this alert get called…
noobsmcgoobs
  • 2,716
  • 5
  • 32
  • 52
2
votes
0 answers

Getting error code 32 from Twitter while fetching users details using Social Framework & SLRequest

- (IBAction)loginToTwitter:(id)sender { self.accountStore = [[ACAccountStore alloc] init]; ACAccountType *accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; [self.accountStore…
Suraj Mirajkar
  • 1,369
  • 10
  • 23
2
votes
1 answer

NSOperationQueue batch SLRequests

Hello for a project I'm working on I have to perform n-SLRequest in background, So what I tought is to add these requests to an NSOperationQueue as the code below show - (void)performBatchRequest:(void(^)(void))completion { NSURL *url = [NSURL…
oiledCode
  • 8,589
  • 6
  • 43
  • 59
2
votes
0 answers

How do i post the current app screen to the Facebook and Twitter sheets using SLRequests in iOS6

I have integrated the below code for the Facebook and Twitter buttons. I currently have test images there to post in the social media sheets - however i want to post the current app screen not a pre determined image as the screen changes all the…
2
votes
1 answer

Update UI after requestAccessToAccountsWithType

I'm developing an app to help me understand OBJECTIVE-X/OSX. The app simply connects to Facebook and sends a notification using NSUserNotification. It is working fine, but now I want to add some UI to the mix. To make the example simpler, I want to…
DiogoLG
  • 247
  • 1
  • 2
  • 12
2
votes
1 answer

ACAccountStore return empty array on device but works on Simulator

I'm working on an app where I want to post to Twitter using SLRequest. I have got it to work on the simulator, but it dosn't work on my device. [self.accountStor accountsWithAccountType:accountTypeTwitter]; Returns an empty array on my device,…
Anders
  • 2,903
  • 7
  • 58
  • 114
2
votes
2 answers

How to send custom tweet with link and images in ios?

I know that how to send custom tweet using SLRequest and TWRequest but i didn't get link when i post message and link. I got only message. The code is: NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"Send to…
Prasad G
  • 6,702
  • 7
  • 42
  • 65
1
vote
0 answers

Showing tweeter timeline but is empty

I was practicing swift with social media and I was following a tutorial of How to add Twitter timeline to you App. Everything seems to be ok but the only problem is that the table that shows the tweets is completely empty. The code is the…
Daniel C.
  • 151
  • 1
  • 2
  • 10
1
vote
1 answer

Replace UIActivityViewController twitter post action with a SLRequest

I am trying to share an animated GIF but default UIActivityViewController Twitter share doesn't support it yet which it will "scale down" it as a still JPG, I have to use SLRequest for it as taught in this article. The downside of that is no preview…
Richard Fu
  • 616
  • 10
  • 27
1
vote
1 answer

upload multiple images to facebook using SLRequest

I have 2 ways for share images to Facebook. The SDK Way (work perfect): FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init]; NSMutableArray *uploadImages = [[NSMutableArray alloc] init]; for (UIImage *image in images) { …
jose920405
  • 7,982
  • 6
  • 45
  • 71
1
vote
1 answer

Updating Twitter profile picture with iOS SLRequest results in error 215 bad authentication data

I am trying to post new profile picture according to Twitter's documentation at https://dev.twitter.com/rest/reference/post/account/update_profile_image and here is my code: NSData *jpeg = UIImageJPEGRepresentation(img, 0.9); NSString *base64 =…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
1
vote
1 answer

Get facebook Page Access Token using SLRequest

How do I get Facebook Page Access Token using SLRequest (with a graph api call) on iOS. I have an app that posts photos to a particular Facebook page. I've got it working through php so I know there is no issue with obtaining such permissions. But I…
hdsenevi
  • 953
  • 2
  • 14
  • 27
1
vote
0 answers

How to implement favorite tweet function on iOS 7

I'm making a Twitter application on iOS 7 using STTwitter . I want to add function of favorite in my application. To getting user stream I used STTwitter, then I want to favorite tweet. But STTwitter doesn't have such function, so I decided to use…
keisei_1092
  • 391
  • 2
  • 14
1
vote
1 answer

How to get authenticated with twitter/get twitter profile image

I want to get the twitter profile image. I get the ACAccount. Then I do an SLRequest. The problem is that response is empty...The app is added on the twitter developer site. I never get an OAuth token or even user the keys generated from the…
jgvb
  • 304
  • 5
  • 16