I have an iPhone app and I want the user to be able to tweet an image that the app displays. The image is already online. I'm wondering can I make the native tweet sheet show the image to the user as they type their tweet.
I know you can do [tweetSheet addImage:[UIImage imageNamed:#"image.png"]] But that is only for a local image that you are uploading to twitter while you tweet right?
Related
How can I access the GameCenter player's photo URL? I know about loadPhotoForSize but it seems to return UIImage. I need the URL as I would like to send this URL to my backend and show this photo for users from non-iOS devices.
There is no available GameCenter player's photo URL. It may exist right now, but Apple can change it any moment. And it is not in open access.
Correct way to show player's photo on another non-iOS platforms is to upload this photo to your game servers. Use loadPhotoForSize to obtain UIImage and than upload it to your server. For example you can use answers from here: ios Upload Image and Text using HTTP POST
I need to share two things:
1. Audio file
2. Image file
I am passing local paths as items to the UIActivityViewController. Previously on iOS 7 it was showing all required options like SMS, Mail, Facebook, Twitter. If I choose SMS or Email it attaches photo and audio both. If I choose Facebook or Twitter it shares photo only that is fine to me.
Now on iOS 8 it just shows SMS and Email. Why here it is not showing Facebook and Twitter like iOS7?
As i saw this in "Viber" application. There is media sharing button which opens all the albums as shown in photos native application. Can we do this ? I found UIImagePickerController cannot shows both simultaneously. How show both photo gallery and video gallery simultaneously ?
You're right about UIImagePickerController here great guide, and github project for picking media.
If you want to share your media here's some cool examples:
Check this tutorial on how to share pictures via email.
If you want to share via mail -
First of all you have to Create NSData object from your PNG/JPEG image data and then implement the method: Send addAttachmentData:mimeType:filename: to your MFMailComposeViewController instance.
Also i think the best thing to use in your case to share stuff like text, pictures etc is Sharekit.
I am developing an iOS app that uses the UIActivityViewController to share some text and a Url. In the Facebook and Twitter services it shows a thumbnail of the site located at the URL.
Unfortunately, the site in question does not look very good at all in the thumbnail. So currently the thumbnail has a negative value in the share dialog. I would either like to prevent the thumbnail from displaying, or supply my own image for the thumbnail. What is the best method to do this?
I would like to avoid having to create my own service and/or dialog.
I have tried adding an image to the item list, however that adds a bunch of services I don't want and adds the Image to the email action and adds the image to a photo album on facebook. The first problem I can get around by blacklisting actions I don't want. And I can make my own UIActivityItemProvider to stop the email problem. However, I have no idea how to prevent the facebook problem. (See How do I customize a UIActivityViewController to show a URL link when posting to facebook and twitter?).
Here is a screenshot of the facebook sharing dialog:
In my iOS app, I am posting videos link (e.g. YouTube video link) and when user click on these link from native Facebook app of iOS the video should open in my app. When I post videos link it shows same as when we post video link from our Facebook profile (suppose post video link then it automatically fetch its info and post it as thumbnail image with some information).
So the problem is when I click on this post from native Facebook app of iOS it is opening in webview instead of open my app. I also enabled "Deep Linking" in facebook app settings of application. The code I use is shown below
SLComposeViewController *fbVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[fbVC setInitialText:#"Check out this video :"];
[fbVC addURL:[NSURL URLWithString:#"http://www.youtube.com/watch?v=NoVW62mwSQQ"]]; //youtube video is example
[self presentViewController:fbVC animated:YES completion:nil];
And if post this link from "setInitialText" parameter then it is simple shows as link (not as a automatic rectangle with thumbnail image and some info ) then it open app but I do not want in this way because it also shows value passed in "deeplink" parameter like "http://www.youtube.com/watch?v=NoVW62mwSQQ/?deeplink=mypost" in the post.
The deep linking is available only for the post made by your application not on the link shared by the users.
For example a youtube video is opened in webview not in the application.
A possible solution is to catch the device from your website and then open the app.