Defining how an Open Graph Post is displayed

孤街浪徒 提交于 2019-12-03 12:37:42

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.

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