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
Related
Is there any way to upload photo programmatically from phone to any photo hosting website(any suggestion for a photo hosting site?)? I need to get the URL only for the uploaded photo to use it on my app. How do you do that?
You can use a service that offer some API like imgur.
You can download the library and see a snippet of code to implement the upload, here on the imgur github page.
When I use photos-redirect:// URL scheme it just starts Photos app.
How can I start Photos app with showing custom photo, for example, last saved?
I can't find any examples, where used photos-redirect:// URL scheme.
photos-redirect:// is the URL Scheme for Photo App. However, it is undocumented, thus you shouldn't use it.
To view / select a photo, use UIImagePickerController .
I want to open instagram with the picture from my app.
In their API
it says to use the MEDIA ID. I am unaware of a media ID. I know of Asset Representation URL form the ALasset library. Does anyone know what they are refering to?
The media ID comes from the Instagram API for the media that was uploaded to instagram. Usually something on the lines like 448979387270691659_45818965. I believe you can grab it in the browser if you go to the media view in your browser and then use developer tools to see the atttribute
I'm writing an iOS app that produces an image, and we'd like the user to be able to post that image to their Facebook wall using the standard facebook dialog.
The Facebook iOS SDK provides a dialog for posting to a user's wall, using the dialog:withParams:andDelegate: method, and you can provide the URL of a picture in the params argument. However, that's no good to me - I want to send off an image that exists only on the phone.
The SDK also provides a way to post an image to a user's wall, using the requestWithGraphPath:andParams:andHttpMethod:andDelegate: method. But that's no good to me either - I want to use the standard dialog.
Is there a way for me to send the image data with an FBDialog?
You need to do a photo upload first, with a graph call to '/me/photos' - this will be in an album that your app will have to create, not an existing one (unless your app created it).
That will return you the photo id, which you can then hit the graph again with a call to that specific id: 'https://graph.facebook.com/RETURNING_PHOTO)ID'
This will return name, picture, source, link (and a bunch of other stuff) - you can then use the picture (which is a thumbnail) in your wall post as the picture and add the URL to the source (big image) or use the link to the photo in the album (link) inside your message text.
Hope this helps,
-J
I have an app that records a video and saves it straight to the photo library on the iPhone. I want to, as soon as the user finishes recording, have the app open up in mail, with the video attached. How should I go about doing this?
I am using this basic idea: http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/
How do I get the file path for the video?
You could either store the video in your app and then attach that into the email before copying it to the photo library or show the user their photo library in the app via UIImagePicker - This may help or just google it ...
http://developer.apple.com/library/ios/#samplecode/MyImagePicker/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010135