With the increasing number of users having access to mobile cameras, there is a growing need to be able to share and associate those user-generated photos with open graph stories. Stories with attached user-generated photos will have all of the same functionality of standard stories, but will help accentuate the photos with a larger display in Ticker, Timeline, and News Feed. You can allow your users to upload a single photo or multiple user generated photos for a single action.
User Generated photos requires additional approval before you can use it. When submitting your action for approval in the App Dashboard, be sure to check the box, "User Generated Photos".
OG Stories with User Generated Action Photos
Open Graph stories that were generated with the "user_generated" parameter will function more similarly to stories generated by stream publish. Immediately you will notice that the size of the photo associated with the story is much larger than standard open graph stories with non user-generated photos as displayed in the Timeline view below:
A similar treatment is applied to the flyout for Ticker stories as seen here:
Criteria and Behavior of User Generated Photos
While it might seem appealing to always show user-generated photos, please consider the following points:
- You can only use large photos if they are original photos taken by a user with an actual camera.
- As a developer, you must also request approval for using this Action Property in the App Dashboard as "User Generated Photos".
- The photo must be at least 480px by 480px in size.
- The photo used will NOT be taken from the object's meta data og:image tag. Instead, it is passed with the POST and can actually be a different photos than the one associated with the object.
- The photo will be uploaded and placed in a Facebook photo album titled after the "App Display Name" for that app, in the format "{App Display Name} Photos".
Albums
The user-generated photo will be uploaded to a user album specially created for that app. If the album did not previously exist, it will be automatically created the first time a user-generated photo is POSTed by that app. The name of the photo album will be titled after the "App Display Name" that was in the App Dashboard settings for that app, in the format "{App Display Name} Photos".
Privacy Controls
The action which the photo is attached to, will follow the privacy settings that the user had granted to the app through the Auth Dialog. However, because the photo is also loaded into an album, that photo will follow the privacy settings of that album. Changes to one privacy setting will act independent of the other.
Specific Properties Required
You can attach a single or multiple user_generated photos when publishing a single action. Your first user_generated photo array should be zero-based. If you wish to upload additional user_generated photos, simply pass the same "url" and "user_generated=true" parameters for each additional photos, incrementing the array value.
The following fields are required:
Property Name | Value |
image[zero-based array][url] | A fully qualified URL to the location of a single user-generated photo |
image[zero-based array][user_generated] | Boolean |
Sample Code for Multiple Photos in a Single Action
https://graph.facebook.com/me/nyccookbook:cook? recipe=http://www.yourdomain.com/pizza.html& image[0][url]=http://www.yourdomain.com/images/my_camera_pizza_pic.jpg& image[0][user_generated]=true& image[1][url]=http://www.yourdomain.com/images/my_camera_soda_pic_2.jpg& image[1][user_generated]=true& access_token=YOUR_ACCESS_TOKEN
To easily play with this feature for posting a single image, you should use the Graph Explorer and include both the
image[0][url]
and image[0][user_generated]
properties. Then check your Activity Log to see the larger treatment of this story.
ComputerExpertiseFacebook comments for blogger brought to you by ComputerExpertise , Get Yours?