Posting big pictures in Open Graph Actions - facebook-opengraph

I am posting photos to Open Graph actions, they get resized to a thumbnail around 50*50 px .
In order to post a picture with activity, I use image[]=URL in action parameters. However my thumbnail gets very small and in the timeline, people had to click on it and get to my site to see actual picture.
However, Foursquare recently implemented a Open Graph integration to Facebook. Now, if foursquare checkins have photos, they are posted to facebook in a high resolution and they appear in timeline like a real Wall Photo posted. (width = 300 , height = auto). (less resized)
How can we achieve that? Is that a deal between Foursquare and Facebook or is it publicly available feature of FB Open Graph?

This feature is called User Generated Photos - its available to any app where the user actually took the picture on their device. It may not be used to make non-user generated photos large.
Here's the docs: https://developers.facebook.com/docs/opengraph/usergeneratedphotos/

Related

Message preview is different depending on LinkedIn profile

My company uses LinkedIn Share API to publish messages on LinkedIn profiles sharing content from WordPress posts.
One thing that is driving me crazy right now is that when I share the same URL and content to two different profiles, the preview cards that result from that are different. On one profile I got a full image preview like the following:
But the same content (same API params to share) produce this different preview:
I'm trying everything I can to get a consistent behavior. I'd like to have all previews being full size previews like the one shown in the first screenshot. API documentation doesn't help much here.
Any help or clue would be appreciated.
It's a random behaviour from LinkedIn. From time to time a significant percentage of accounts reached via the post API return a small thumbnail as well as a different content link (if you use redirected links like bit.ly). It happened for a week in February and since last Friday, including a number of Internal Server Errors. It looks like LinkedIn runs different code on different parts of its infrastructure.
So there is nothing you can do programmatically on your end I'm afraid.

Thumbnails not showing up on LinkedIn share posts

We've set up a new mini-site with extensive social sharing, including LinkedIn. Lots of OpenGraph tagging, the works. We have chosen specific images to be shown when sharing by using the og:image meta property.
The images work fine on Facebook and Pinterest, but are not working properly on LinkedIn. Here's the OG image tagging:
<meta property="og:image" content="https://img.mshanken.com/d/wso/Articles/2016/ST_TheBreakers070516_1600.jpg">
But if you click the LinkedIn icon we have set up at the bottom of our page, you end up on a share page that looks like this, which does NOT show the image:
Weirder still, if you inspect that share preview, the image IS in the source code:
<div class="image-thumbs-container">
<img src="https://media.licdn.com/media-proxy/ext?w=180&h=110&f=c&hash=q0uvWygJS2HJrhZZ2qZGdYu2Tig%3D&ora=1%2CaFBCTXdkRmpGL2lvQUFBPQ%2CxAVta5g-0R6jnhxUzw8p4aCKqEH-50hKCoaTFXP-RFTovozTPCKqZsXfeLS-xzl5HHRU4kZnLrT9AnPhFZO5KoyAfNpxi4m_ZMc" width="130" alt="Preview of the share image" data-orig-url="https://img.mshanken.com/d/wso/Articles/2016/ST_TheBreakers070516_1600.jpg" data-width="" data-height="" data-size="" data-position="1" class="active">
</div>
What do we need to do to get that image showing up on LinkedIn shares?
I was having the same issue last night. Spent hours researching solutions. Finally I contacted LinkedIn about this issue and they responded right away. Their development team has implemented a new tool called "Post Inspector", which allows you to optimize content sharing. Literally, in just minutes this worked.
All you have to do is type in your URL and they do all the busy work i.e. verifying correct code of properties such as image, author, title, description, publication date etc. Not only do they verify, they also tell you what to include and what is missing.
Here is the website to use Post Inspector:
https://www.linkedin.com/post-inspector/
Couple of things it could be:
The dimensions 1600x900 and size of 220kb are within LinkedIn's requirements. However, your aspect is 16:9 instead of 4:1 / 1:4.
Max file size: 1 MB
Minimum image dimensions: 80 x 150 pixels
Recommended aspect ratio: 4:1 or 1:4
Making Your Website Shareable on LinkedIn
Your image URI is https, it could be they are unable to retrieve your image. Have you tried with an http image?
Note: If the image meets the requirements, but it still does not
appear in updates on LinkedIn, your website may be blocking us from
pulling the image or the image may be located on a protected directory
or website.
Making Your Website Shareable on LinkedIn
Was the image change from the first time LinkedIn crawled your page for the image? They do cache for ~7 days.
The first time that LinkedIn's crawlers visit a webpage when asked to
share content via a URL, the data it finds (Open Graph values or our
own analysis) will be cached for a period of approximately 7 days.
This means that if you subsequently change the article's description,
upload a new image, fix a typo in the title, etc., you will not see
the change represented during any subsequent attempts to share the
page until the cache has expired and the crawler is forced to revisit
the page to retrieve fresh content.
Shared Content Caching
Chiming in from the future - I faced this issue today as our site update wasn't displaying the proper image. In my case the solution was simple: try posting the link like so: https://url.com/?jhskjsh and it forced linked in to fetch the meta tags again which then displayed my image, as opposed to the grey square it previously had.

How to get a Google profile image with specific resolution on Android

There seems to be no direct way to query a users google profile image with a specific resolution on Android. The documented approach is here: https://developers.google.com/identity/sign-in/android/people
That approach provides an image URL which is of a low resolution (using: GoogleSignInAccount's getPhotoUrl() method).
The corresponding approach on iOS does have a way to get the profile image by specifying a resolution as mentioned here:https://developers.google.com/identity/sign-in/ios/api/interface_g_i_d_profile_data#a8e229bffe211894473058c4ba247553c
The workaround suggested in one of the stackoverflow posts is to do a string replacement in the retrieved URL to get a larger image. Link: Photo size in getPhotoUrl() method Google Identity toolkit
Is there a better way to get a higher resolution google profile image on Android for Google Sign-in?

me/home graph api not returning open graph actions shown in news feed

I have defined custom open graph action and objects in my facebook app, and I can see the shared open graph actions in my facebook's news feed webpage. However, when I do a me/home graph api call, I can get everything in the news feed except for the shared open graph actions. Anyone knows if open graph actions/objects are available through me/home?
Facebook uses factors such as your app's popularity, spam rates, click rates, quality of images on the objects and possibly more to determine how to render an action in the newsfeed - or how not to render it. Your actions are more likely to show up on the news feed as your app grows more popular.
See https://developers.facebook.com/docs/concepts/opengraph/distribution:
Note: we consider various factors such as image quality, spam rates, and click rates when determining how the story is rendered, so you may not see the story show up in your News Feed when testing.

Using the facebook popup design in my app

I am developing a Facebook App and I want use the exact design (style) that facebook has, to show a post - picture, link, status etc. So for example I show a link to a post on the wall that has a picture in it and when the user wants to see details about it, a popup shows all info (picture, likes, comments etc) exactly how Facebook shows it if you would click the picture in your wall. My question is: am I allowed to copy the exact design of the pop up, or is there a way I can do this by just calling a function with the parameter being the post id?
Thank you.
Yea - you can recreate their UI. Checkout this answer I gave a little while back - it might be useful to you.
http://facebook.stackoverflow.com/a/8912265/558021
The only issue with recreating their UI (IMO) is to start altering their brands.

Resources