Questions tagged [slcomposeviewcontroller]

The SLComposeViewController is a class in the [Social-Framework] (new in iOS 6) that presents a view to the user to compose a post for supported social networking services.

The SLComposeViewController is a class in the (new in iOS 6) that presents a view to the user to compose a post for supported social networking services.

SLComposeViewController uses the isAvailableForServiceType: class to check if an account is available for the specified service type before the controller is presented.

Supported service types include:

  • SLServiceTypeFacebook
  • SLServiceTypeSinaWeibo
  • SLServiceTypeTwitter
196 questions
77
votes
3 answers

Tutorial for SLComposeViewController sharing

What are the steps I need to follow to use iOS 6's new SLComposeViewController to post to Facebook, Twitter or Sina Weibo?
Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
25
votes
6 answers

LaunchServices: invalidationHandler called - iOS 8 share sheet

Seeing this error message in the logs, though not consistently, around the time that I use SLComposeViewController to open a Twitter or Facebook share sheet. I am not using any new iOS 8 API, just testing existing code on iOS 8. I see others have…
Kyle Clegg
  • 38,547
  • 26
  • 130
  • 141
20
votes
2 answers

setInitialText method in SLComposeViewController iOS 8.3 does not show text in Facebook sheet

The code snippet below is the callback for an on screen button. The Facebook sheet appears but contains no text. However, if you replace SLServiceTypeFacebook with SLServiceTypeTwitter it does show the initial text. I am using XCode 6.3.1 and iOS…
18
votes
3 answers

SLComposeViewController dismisses differently for Facebook and Twitter?

I have some social sharing code that looks like this: SLComposeViewController *composer = [SLComposeViewController composeViewControllerForServiceType:…]; [composer setInitialText:…]; [composer addURL:…]; [composer…
zoul
  • 102,279
  • 44
  • 260
  • 354
17
votes
3 answers

About "SLComposeViewController" in iOS 11 beta

In my project, I always use SLComposeViewController to share contents with third-party apps, but now, when I update my iPhone to iOS 11 beta, this no longer works. The SLComposeViewControllerCompletionHandler always callback…
hujie
  • 181
  • 1
  • 1
  • 4
13
votes
5 answers

SLComposeViewController post both image and url ios9

What I am trying to do and it doesn't work is the following: post an image of my choise and also an url to facebook using the built in facebook sharer, the problem is that it doesn't work to upload both, it's either picture + text and works nice or…
Catalin
  • 1,821
  • 4
  • 26
  • 32
13
votes
1 answer

iOS 8.3 SLComposeViewController Facebook bug

I have just noticed a problem in SLComposeViewController Facebook, no text is not to display inside, even official the Youtube application has this problem, do you have a solution?
victor bill
  • 209
  • 2
  • 15
11
votes
2 answers

SLComposeViewController setInitialText not showing up in View

I'm trying to use the SLComposeViewController to share a link in my iOS App. SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [controller setInitialText:@"Here's the link I…
Michael Reiland
  • 849
  • 3
  • 8
  • 19
10
votes
5 answers

isAvailableForServiceType always returns true?

Simple line of code: NSLog(@"Checking on Facebook: %d -- Checking on Twitter: %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook], [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]); Problem is that…
Ryan Garcia
  • 215
  • 2
  • 7
8
votes
4 answers

Why am I unable to post to Twitter using SLComposeViewController?

I'm trying to post an article title and an article URL to twitter and then append the app's name to the end of the tweet. So something like "How to grow a cactus (via @appname)" attached URL I was having trouble figuring out how to balance the…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
8
votes
5 answers

iOS SLComposeViewController - url not displaying for twitter post

I am using the SLComposeViewController to post to twitter and Facebook. I have the same code for both twitter & facebook but the URL is not showing up in the twitter post. How do I fix this? Twitter code - socialController =…
rohan_vg
  • 1,087
  • 3
  • 15
  • 27
7
votes
0 answers

SLServiceTypeTwitter in iOS11 ond over

I have the code: #import //... //... -(void)work { if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { SLComposeViewController *controller = [SLComposeViewController…
ZaurGiyasov
  • 126
  • 6
7
votes
0 answers

SLComposeViewController.isAvailableForServiceType returns true, though no account is configured

I'm using the Social framework with XCode 7 beta / iOS 9 beta. The Facebook app is installed on the (physical) device, but in settings, no account is configured. According to the documentation: For the account to be available, the user must be…
sudo make install
  • 5,629
  • 3
  • 36
  • 48
7
votes
1 answer

App Freezes after sending tweet

Hi I have two UIButtons in an iOS app. One is to post to twitter the second is to post to Facebook. The facebook button works perfectly however the tweet is casing me some problems, the tweet sheet will open with the populated text, however it takes…
sjbuchanan007
  • 111
  • 1
  • 11
6
votes
2 answers

setInitialText not work with IOS 8.3 (facebook,social,SLComposeViewController)

The functionality of SLComposeViewController no longer works as expected with the newest Facebook iPhone app update as of April 24th. Any initial text specified is ignored, though the setInitialText method returns true as if it was successful. The…
1
2 3
13 14