Facebook - Photo posted with App is not publicly accessible - ruby-on-rails

I'm making Rails app that needs to view and post photo to a specific Album of a Page.
So User can view and Admin can upload.
I finished the uploading part but got a problem. The problem is: All photos that are uploaded by the App doesn't show up with the Graph API (/<album_id>/photos) even though it says Public when I view it in facebook.com.
I tried uploading the photo manually to the album and it shows up in my App just fine.
Is this intended behavior or there's a parameter that I need to pass?
[EDIT]
I just tested with Graph API Explorer. If I'm logged in with the Page's admin account, I can view all. If other account, can only view the photos that are uploaded via facebook.com.
Thanks

While posting photo data to graph API, you need to set privacy of the photo.
You need to pass {'value': 'EVERYONE'} as the value for privacy in your API call.

Just got this figured out. My app is still on development mode. Activate it and all the photo will appear in the API call.

Related

Twitter Omniauth Profile Picture Broken after changed on Twitter

I have twitter ommiauth as my user model and I pull in when they register a link of their profile picture via the hash auth.info.image. Iv noticed some are now breaking where the user has updated their profile picture on Twitter.
I noticed there is a part of the hash that gets the image over https (profile_image_url_https) in the raw_info section. Details here https://github.com/arunagw/omniauth-twitter. is this the best practice to link to so it doesnt happen again?
My issue is that I may have a user that logs in once and leaves a comment but then their profile changes and it breaks on the site.
Is there another way I should be implementing this?
Any information would be much appreciated.
If you are saving the twitter image url when a user creates an account or logs in via oAuth and not checking whether it has changed when attempting to display it this would be expected. The only thing I can think of to fix disappearing links would be to test the data with an http or url call and replace it with a placeholder image or ping the API to retrieve the updated image.

Facebook app permissions

I have an iOS app which posts to Facebook on behalf of the user logged in through the iOS Facebook setting.
Two problems -
the posts are marked private, the users friends don't see them.
The iOS app want to be able to harvest Like and Comment info but I get back a 400 from FB.
Here's the wrinkle, my Facebook account works perfectly (posts are visible to friends and I can get the Like and Comment info), but a test user account will post only as private and the iOS app gets a 400 when trying to get post info.
The attached screen shots show the different permissions (top for tester, bottom for me) but I can figure out what to ask Facebook for at login to get the same permissions for both users. Currently I'm asking for publish_actions and user_status.
Any help would be much appreciated!
You need to make sure you are asking for public_profile also you need to make sure you split your permission access into two pieces, as per FB, 1) read 2) write
Just follow the login process on the Facebook Dev page, this will allow you to outline your permissions the right way. Also make sure your test user is added into the groups on your Facebook Dev portal.
Also can you provide any code of what you have tried?
Turns out the post_id element was not what I wanted but rather the id. After that I could use json to get the comments and likes. So the call was almost correct.
And adding stream_read to the permissions got the post to be visible to friends...
Thanks for all the help!

I get confirmation of my posted open graph action, but don't see any posts

I am using the new Facebook IOS SDK 3.0 and have integrated the Scrumptious sample into my app. I have specified the namespace and action for my app correctly. When I click "announce", I get "posted open graph action, id: xxxxx" so it looks like my post is successful. I am assuming the post will go to my personal Facebook news stream since that I who I am logged in as, however I don't see anything. Is there anything that needs to be done with my app to make it active? Or other settings that I might be overlooking? Thanks.
It turns out I didn't enable timeline on my facebook account so I didn't see the posts. Once I enabled it, I was able to see them. I could also see them in my activity log. I have another issue with tags now, but at least I am able to post now. Thanks.

Twitter, Facebook - is there any way to get the original images of avatars?

Through RoR gem OmniAuth is possible to get an informations about the users, who log-in to the application through their Twitter or Facebook account. Both of these social sites in their API offers among other also the avatar, what's great.
The worse thing is, that the size of image is 50x50px (I know, avatar).
Exist any way, how to get the original image, from that was created avatar? (The reason why I want it is, that I would like to display a photo of user in the bigger size)
Two options:
GET /${USER_ID}/picture?type=large; the response is a 302 redirect so you can obtain the url from the response header. See the docs for the User object for other values for type. (Contrary to the docs it looks like an access token is required.) This doesn't get you a particularly large image.
GET /${USER_ID}/albums and find the album with type=profile. GET the photos in this album with /${ALBUM_ID}/photos: I think the first photo is the current avatar (it is for me), and more sizes are available than with the first method.
You may try to get from gravatar[1] with email.
http://en.gravatar.com/site/implement

Is it possible to fetch facebook user's profile without logging using facebook connect?

Basically, I want to fetch facebook profile avatars onto my application since I am using their login to create a particular record. How do we display their profile pic without actually forcing the user to connect into facebook to retrieve these pictures?
You can use the fbml fb:profile-pic tag or you can use the users.getinfo API call without the user logging in, however it will then use the default "everyone" privacy level for the pictures you're trying to get.

Resources