slcomposeviewcontroller

How can i post on twitter without showing dialogue in ios?

房东的猫 提交于 2019-12-10 12:16:42
问题 I want to post my status on twitter. I want to add an image, but I dont want a share dialogue. Instead I'd like an interface like Instagram, where the user just selects twitter and presses 'share', so it's easy. Here is my running code so far: // Create an instance of the Tweet Sheet SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType: SLServiceTypeTwitter]; // Sets the completion handler. Note that we don't know which thread the // block will be

isAvailableForServiceType always returns true?

↘锁芯ラ 提交于 2019-12-09 15:23:39
问题 Simple line of code: NSLog(@"Checking on Facebook: %d -- Checking on Twitter: %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook], [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]); Problem is that I'm getting 1 for both BOOLs. That's a problem because neither Twitter nor Facebook is setup with an account. This is on the simulator, so wondering if people have experienced this is happening on devices as well? Documentation says that it should

How to present a SLCompose view controller from NSObject Class

给你一囗甜甜゛ 提交于 2019-12-08 08:49:08
问题 Here is my code : if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { SLComposeViewController *viewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; //Tell him with what social platform to use it, e.g. facebook or twitter [viewController setInitialText:sQuotes]; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate.navController presentViewController:viewController animated

Posting score to facebook

谁说我不能喝 提交于 2019-12-07 12:32:10
问题 I created an app in SpriteKit with xcode where when the game is over, it shows you your score, and I want to add the feature to post your score to facebook. Pretty much all my code is in MyScene.m where it can't access presentViewController . Only my ViewController.m file can access that, so I tried calling a instance method in Viewcontroller from Myscene.m but I can't find a way to do that. The only way I have found calling methods from other files is using +(void) which is a class method I

Unable to post image into facebook using SLComposeViewController?

时光怂恿深爱的人放手 提交于 2019-12-06 07:21:37
问题 I would like to post image into facebook and twitter. I am fine with twitter but not with facebook using SLComposeViewController class. With out add image i am able to post text and url into facebook. The problem is when i use add image i was unable to post this image and also text, url. SLComposeViewController shows image, text and url when i send. I have correct appId and i did not get any errors. But the problem is still there. I don't where the problem is. Please help me. - (void

Posting score to facebook

混江龙づ霸主 提交于 2019-12-05 21:26:19
I created an app in SpriteKit with xcode where when the game is over, it shows you your score, and I want to add the feature to post your score to facebook. Pretty much all my code is in MyScene.m where it can't access presentViewController . Only my ViewController.m file can access that, so I tried calling a instance method in Viewcontroller from Myscene.m but I can't find a way to do that. The only way I have found calling methods from other files is using +(void) which is a class method I think. Myscene.m: if (location.x < 315 && location.x > 261 && location.y < 404 && location.y > 361) { /

isAvailableForServiceType always returns true?

旧城冷巷雨未停 提交于 2019-12-04 02:28:29
Simple line of code: NSLog(@"Checking on Facebook: %d -- Checking on Twitter: %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook], [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]); Problem is that I'm getting 1 for both BOOLs. That's a problem because neither Twitter nor Facebook is setup with an account. This is on the simulator, so wondering if people have experienced this is happening on devices as well? Documentation says that it should only return true if the service is available and at least one account is setup. But I'm getting true

Set StatusBar Color for Extensions in UIActivityViewController

百般思念 提交于 2019-12-02 04:32:53
问题 Following situation given: iOS 8+ App (mainly Swift). StatusBar is set to View controller-based status bar appearance . Within the App multiple UIActivityViewControllers are used to display sharing options. The Problem: Some sharing activities have wrong StatusBar colors. Those are the device installed extensions shown when using an UIActivityViewController . Here: the sharing activities, like e.g. WhatsApp, Tumblr, Skype. What I want to achieve : Default StatusBarStyle for this App is

Set StatusBar Color for Extensions in UIActivityViewController

狂风中的少年 提交于 2019-12-01 23:45:54
Following situation given: iOS 8+ App (mainly Swift). StatusBar is set to View controller-based status bar appearance . Within the App multiple UIActivityViewControllers are used to display sharing options. The Problem: Some sharing activities have wrong StatusBar colors. Those are the device installed extensions shown when using an UIActivityViewController . Here: the sharing activities, like e.g. WhatsApp, Tumblr, Skype. What I want to achieve : Default StatusBarStyle for this App is .LightContent to fit a local UIAppearance (tinting a base NavigationController class). Remote FullScreen

SLComposeViewController with screenshot but not image attachment

青春壹個敷衍的年華 提交于 2019-12-01 18:05:41
I notice that Mobile Safari's Twitter and Facebook share adds a screenshot of the current page without actually sharing it, eg: Im trying to duplicate this via SLComposeViewController, however calling the addImage: actually adds the UIImage to the tweet/facebook album (as expected). Is there a way to just display the screenshot of the page without adding the image ? Edit: Looks like SLComposeViewController conforms to UIAppearanceContainer however the UI_APPEARANCE_SELECTOR is not documented. Safari is previewing the screenshot to the website because it has it loaded and ready in on the screen