Generally, when we post a photo to Facebook using the Facebook iOS SDK, it automatically goes into a photo album named after the application. For example, if the Facebook application is called "MyApp" then the photo gets saved to the photo album 'MyApp photos'.
However, as of two days ago, an app that we are working on has started behaving oddly, with all the photos posted through it being saved to a 'DifferentApp photos' photo album.
The photo is still associated with the correct app because underneath the caption it still says 'X minutes ago via MyApp' and the MyApp link goes to MyApp. For the life of me, I can't work out how 'DifferentApp' came into the picture.
The code that posts the photo hasn't changed but for what it's worth;
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:img, #"picture",message,#"caption",nil];
[appDelegate.fbObj requestWithGraphPath:#"me/photos"andParams:params andHttpMethod:#"POST" andDelegate:self];
What has changed is that we are now forcing the Facebook SDK to authenticate via in-app webview rather than by switching to the Facebook app (see Disable Single Sign On (SSO) in Facebook IOS SDK)
A few other points to consider;
If we delete the 'DifferentApp Photos' album and then post a new photo, the photo gets saved in a another album, i.e. 'ThirdApp Photos'
We registered a whole new Facebook app and posted photos through that - the photos still go to the wrong album
Any thoughts/ ideas would be greatly appreciated.
Check the photo id which comes in the response after calling me/photos on the graph API and you might notice the same thing I did. And now, for the rest of the story :-)
I ran into the same issue with newly created Facebook apps while apps I created months ago still allowed me to upload pictures to my wall & associated photo album without any issue.
Surly the photo was getting uploaded to Facebook since a valid response was coming back with the photo's id however turns out if I append the newly uploaded photo's id to http://www.facebook.com/photo.php?fbid= the photo would show up but in an album which couldn't be deleted nor was accessible in my list of albums. (The album was named after an iOS app which used Facebook Connect, I made over a year ago)
After more hacking and whacking I decided to log into my iOS app with another Facebook account which hardly has any data. To my surprise I was able to successfully upload a picture to the app's album and see it appear on my wall.
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
So I programmed in the SLComposeViewController for Social Framework to add a FB share button. From Google I found the Facebook logo that I used as a UIImage to place on top of the FB share button. When the user clicks on the FB share button there's a link to my app store page. The user can either type a message up or not and click POST to post that message on their Facebook pages. When they post that message they will see my App store page link there too.
Does app contain, display, access third party content
I'm trying to submit my app for review, do I click YES or NO for...
If I click YES then I need to get permission. Who do I get permission from? Google for finding a Facebook logo on their site or Facebook for using their logo to post message to their site?
Just visit facebook here and read this about how what to do, this will explain what they want YOU to do with branding and HOW their logo should appear, they also give you access to download their own image assets to use, they are very high quality:
https://www.facebookbrand.com/
And no, I doubt your app would qualify you for a YES to the App Store question, I'll have to find some very recent examples of this for you, but I wouldn't worry about this at all for your purposes.
And for fun and to make sure people see this, here's more brand assets:
Twitter: https://about.twitter.com/company/brand-assets
Instagram: https://www.instagram-brand.com/
Google: https://developers.google.com/+/branding-guidelines?hl=en and http://gplus-brand.appspot.com/
Apple: https://developer.apple.com/app-store/marketing/guidelines/
Tumblr: https://www.tumblr.com/logo
Youtube: http://www.youtube.com/yt/brand/
Reddit: https://www.reddit.com/about/alien/
Pinterest: https://business.pinterest.com/en/brand-guidelines
LinkedIn: https://brand.linkedin.com/
Yahoo: https://info.yahoo.com/press-center/logos-images
And how about some Brand asset colors as well:
http://jgthms.com/social-media-assets/
And a whole huge list of brand assets:
http://findguidelin.es/
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
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.