slcomposeviewcontroller

Trying to dismiss View Controller that presents SLComposeViewController after user posts to FB in iOS

一曲冷凌霜 提交于 2020-01-06 14:47:12
问题 I am presenting an SLComposeViewController to post to Facebook in my app. The user is able to dismiss this View Controller in one of two ways: either by posting their post to Facebook, or by pressing "cancel". When the user presses "cancel", the SLComposeViewController is dismissed, and the user is returned to the presenting View Controller that is behind it. However, what I would like to do is if the user presses "post", then I want the presenting View Controller to ALSO be dismissed after

Unable to share PDF URL on Facebook using SLComposeViewController

旧巷老猫 提交于 2019-12-24 14:34:34
问题 I have created sharing module for Titanium Appcelerator using social.framework. Following is my code: - (id) Facebook { //if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) //{ NSLog(@"Sharing via Facebook", nil); SLComposeViewController *fbSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [fbSheet setInitialText: [dictPost valueForKey: @"post"]]; [fbSheet addURL: [NSURL URLWithString: [dictPost valueForKey: @"link"]]];

SLComposeViewController Facebook posts as iOS instead of Facebook Application Identifier

两盒软妹~` 提交于 2019-12-24 05:52:47
问题 I'm currently working on a prototype for adding Facebook social features for future iOS games. One of the features I've been working on involves using the new native Facebook Composer to post to a link to the game, and then tracking the post and giving the player coins for every person who likes the post. After the post, I get their feed and look for a post with a matching application ID. I've already got that part working correctly if I don't use the new native Facebook Composer (either old

SLComposeViewController with screenshot but not image attachment

二次信任 提交于 2019-12-19 19:46:31
问题 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.

Can not Hide Keyboard with SLComposeServiceViewController

青春壹個敷衍的年華 提交于 2019-12-13 02:01:10
问题 My Share Extension doesn't require any user input aside from configuration in a table view so I am trying to hide the keyboard when the view is presented in Safari. I'm able to run my code in the simulator fine but when I test on my device, I'm the Share Extension doesn't launch and Safari hangs. I've tried a few ways to prevent the keyboard from launching -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; self.textView.text = @"\n Place Holder Text"; self.textView

Cannot share both image and text on Twitter using SLComposeViewController

心已入冬 提交于 2019-12-12 14:42:34
问题 I'm simply doing so: if let vc = SLComposeViewController(forServiceType: SLServiceTypeTwitter) { vc.setInitialText("Tweet text") vc.add(image) present(vc, animated: true) } I've done this in my app for a long time now and it used to work fine, but I just realized recently it doesn't work anymore. Now, only the image is being displayed, the text section is empty. So... what happened, what to do? 回答1: Try using TWTRComposer instead of SLComposeViewController . TwitterKit provides a lightweight

XCTests for SLComposeViewController

我与影子孤独终老i 提交于 2019-12-12 01:59:18
问题 i was trying to write unit test cases using XCTest for SLComposeViewController and couldn't find any solution so far.Any suggestion in terms of approach and code would be helpful. My objective is to test the below code using XCTest SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; SLComposeViewControllerCompletionHandler __block completionHandler = ^(SLComposeViewControllerResult result) { [tweetSheet

I can't share a content from my iOS app to the Facebook when Facebook app is installed

流过昼夜 提交于 2019-12-11 13:35:56
问题 if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { imageUser.hidden=NO; // [imageUser sendSubviewToBack:_horizontalScrollView]; SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; UIImage *goImage=[[UIImage alloc]init]; goImage=[self scaleImage:image123]; [controller setInitialText:@"Check out my pic from "]; [controller addURL:[NSURL URLWithString:@"www.awesomeapp.com"]]; [controller addImage

SLComposeViewController get the user that made the tweet and the message tweeted

与世无争的帅哥 提交于 2019-12-11 03:48:11
问题 I really want to use the iOS social framework and SLComposeViewController to tweet from my app but I need the twitter handle of the user tweeting and the tweet text on the completion (without me fetching latest tweets from all of users twitter accounts and detecting which one he used). Can I achieve this? If not, is there a good alternative for a textView with twitter handle autocomplete, character counter and twitter account selection? 来源: https://stackoverflow.com/questions/24143286

how to share content on facebook, twitter and instagram using SLComposeViewController swift

两盒软妹~` 提交于 2019-12-11 00:43:10
问题 i want to share content and images on social media using SLComposeViewController in swift. i have also done it in objC but i am new in swift development.please suggest me if there is any common class for this or Any library to share content on social media in swift. 回答1: There is no need of library. What you need to do is: 1) Just import the Social framework. 2) Code to post on Facebook let vc = SLComposeViewController(forServiceType: SLServiceTypeFacebook) vc.setInitialText("Picture Text")