Post image to facebook album without wallpost about it? - ios

I'm thinking about a two step OpenGraph image upload workaround (post to album, get photo link, call OpenGraph with the image url), but I need to hide the album post from the user's wall.
If my suspections are right, I can't upload image along an OpenGraph object (thatswhy I want to work around).
So possible to hide album upload from the user's wall?
Or the original problem, possible to upload image file along OpenGraph object?

Related

GameCenter get GKPlayer photo URL

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

How to upload photo to image hosting website programmatically?

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.

UIActivityViewControlloer don't show thumbnail for links

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:

Can I attach an image to an FBDialog?

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

how to create new photo album for facebook with iPhone

I'm able to push a image from my iPhone to the facebook wall successfully. But when I try to push my 2nd image the image is uploaded successfully on the wall but appears side-by-side instead of appearing as the different wall post.
This is because the images uploaded will be added to the same photo album. So is there any way to push these images to new album so that every album contains 1 image?
First make sure you have publish_stream permission to create a new album.
Then to create a new album, make a Graph API call to https://graph.facebook.com/me/albums with parameters for the access token, the album name, and the album description. If the album is created successfully the new album ID will be returned.
Then make a call to https://graph.facebook.com/NEW_ALBUM_ID/photos with the access token and other photo parameters to upload your photo to the new album.
By default, if you do not specify any album and just push photos to the me/photos endpoint your photos will end up in an album automatically created for your application.

Resources