Defining how an Open Graph Post is displayed

▼魔方 西西 提交于 2019-12-04 19:07:53

问题


I'm posting a custom Open Graph object/action to Facebook successfully.

Our production and staging environments each have their own FB app, which are configured identically (except that in our production app, objects and actions are approved, as is our App Details page).

For some reason though, staging is posting with a larger photo with title/description underneath. Production posts have a smaller image with all text to the right.

I don't remember doing anything special on staging, but in the end, we want posts from production to look like they do on staging. Any idea which setting I need to tweak?

UPDATE: I've learned the stories with larger images are called "image-led stories." The only thing that's mentioned in the above link as to how to get this new layout is:

Larger News Feed story layout generated by an Open Graph post using an image size larger than 200 x 200px.

Using the FB debugger, you can see that both images scraped by FB are 600x600:

  • Story from production (small layout)
  • Story from staging (large layout)


回答1:


Frustratingly, there is no setting you can tweak, and it's totally out of your control as to how your posts will display in someone's News Feed. If you want the "image-led" display style, your photos need to be >= 200x200, but other than that, Facebook determines how it's going to display something.

I found this out after a few days of banging my head and reading everything over the web and finally giving up. We shipped the feature and I just told my coworkers there was nothing we could do.

Then, in my News Feed, I saw a coworker's posts, and they were formatted with the small image. Later that day, she sent an email thanking me because she was excited about the OG integration with our site, and the screenshot she sent had her posts in her feed with the large image.

Same person, same posts, different display in two different feeds.




回答2:


If someone is having this problem you can solve it by setting the following:

1) On open graph console inside action type mark this option --> User Generated Photos - Let users include photos taken with the camera on their device

2) On your SharePhoto setUserGenerated on true.

SharePhoto photo = new SharePhoto.Builder()
                .setUserGenerated(true)  // Necessary to post a big image
                .setBitmap(shareItem.getImage())
                .build();


来源:https://stackoverflow.com/questions/16157165/defining-how-an-open-graph-post-is-displayed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!