Content to share in Facebook is empty [duplicate] - ios

I could set custom picture and caption for link. Now it is impossible for v2.9. Is there some kind of workaround without specifying og: tags.
When using Facebook Graph v2.8, you could post a link and display a custom image and not the "og:image".
This was done by adding the picture parameter to the hook.
https://graph.facebook.com/v2.9/me/feed?link=https%3A%2F%2Fwww.google.com%2F&picture=https%3A%2F%2Fi.ytimg.com%2Fvi%2FtntOCGkgt98%2Fmaxresdefault.jpg&name=test&message=this%20is%20a%20test&access_token=**********
The graph API is at 2.9 and as per the documentations this is still supposed to work Facebook API doc
However, it keeps getting overridden by the scraped image. Is anyone else experiencing this problem or have a workaround.? Facebook API Explorer

picture, name, caption, thumbnail, description are all set to be deprecated.
https://developers.facebook.com/docs/apps/changelog#v2_9_90_day_deprecations

You can go ahead and use Open Graph for posting images with custom description and title.
You can get an insight of the same from this link -> https://developers.facebook.com/docs/sharing/webmasters?hc_location=ufi

Related

How to prevent automatic link preview generation for status update in Twitter API?

I am using Twitter API to post status updates programmatically.
However, when my status contains a link, Twitter automatically adds the preview for that link. Sometimes it's not the desired behaviour, however, I didn't find a property in the API to disable it.
I know we can remove the link preview when posting manually via the Twitter website, as described here Remove Preview Image when Posting a Link on Twitter, so I suspect that it's possible, but API never mentions it.
Also, I am using tweepy library for Python, but happy to resort to the raw POST if that solves my problem.
Any ideas what should I add to the request to prevent the link preview generation?
I actually tried to post to Twitter manually on the web, twice:
With the generated link preview
Explicitly removing the preview (clicking the cross button once the preview is generated)
While doing it, I observed the payload that the website sends to the Twitter servers (with Chrome Dev Tools).
And interestingly enough, the only difference between these two tweets was only one property: card_uri: tombstone://card. More specifically, this property was present in the tweet without the preview.
After that, I actually tried to go and add card_uri property to my status update request, and it actually did the job: the preview was not automatically rendered.
Conviniently, tweepy library has an optional card_uri argument in the update_status menthod.
To sum up, you need to set card_uri='tombstone://card' in your request to prevent Twitter from autogenerating the link previews.
Unfortunately, I didn't find any references to this in the API (or in Google at all), so I am not confident that this is a long-lasting solution, but that's at least something to start with.

Displaying Image in Image Attachment

According to the Slack API, if you provide a valid link to an image_url, that image will be displayed. I've tried this with the message builder here but no image is ever displayed. I also tried this using cURL, and once again the image doesn't display. Any idea how to get the image to display? This is for use in creating a bot to send notifications through an incoming webhook. Thanks!
Image of JSON and corresponding message preview:
They seam to be two problems with your example.
You can not use both image and thumb together in the same attachment. If you want to use both in your message, just create another attachment.
When using imgur you need to use the direct image link, not the imgur page link.
Here is a working example.

Explicity disable image sharing to facebook using mini_fb gem

I use mini_fb to share text and images to facebook. My requirement is
When share text then it should share only text
When share text with image, then both text and image should be shared.
My problem is when I share text only, then a random image from the url is posted to facebook along with text. When I searched for it, I found that facebook is picking up images with og:image tag, and picking the last image and posted it.
But there is no explicit meta tag with property "og:image" in my site.
To avoid this I also put explicit meta tag with property "og:image". But the client does not need this.
Can I explicity disable image sharing to facebook, when no image is shared to facebook using 'mini_fb' gem?
it seems that at the moment it isn't possible, not because of the gem, but because of facebook.
By removing the ability to customize link metadata (i.e. headline, description, image) from all link sharing entry points on Facebook, we are eliminating a channel that has been abused to post false news.
you can see more information about this here
https://developers.facebook.com/blog/post/2017/06/27/API-Change-Log-Modifying-Link-Previews/
the way you solved it at the moment is the right way. it's better for you to set explicit the image you want to show, so there is more control about it by you.

Is it possible to tag a user/page through Facebook open graph api?

I found this post on SO as well as some other links on the web but they all seem outdated and seem to indicate that FB has not yet exposed this through the Open Graph API and i couldnt find anything to the contrary on the web. I am trying to find a way to post an image to a users wall and be able to tag multiple users in the post title or caption?
Is there still no way to do this through the api or somehow achieve the same result?
Tagging user/page in photo caption
This is not possible through the Graph API, and as far as I know the old #[user_id:0:link_text] is currently unavailable. Sadly I'm going to say that it is not possible at the time of writing this post.
I'll update this post with relevant info if I come across any.
Tagging user/page in Photo
This is possible through the Graph API.
The documentation for how to accomplish what you are looking for is located under the headline "tags" if you follow the link below:
developers.facebook.com - Core Concepts › Graph API › Photo

How to attach a site thumbnail from user submitted links in a facebook application

The Facebook application I had in mind has users submit links from sites. I would like there to be a thumbnail of the site, similar to what happens when you post/message someone a link and a thumbnail automatically shows up. Any thoughts on how to go about doing this?
The sites you link to need to have Open Graph tags (https://developers.facebook.com/docs/opengraph/) on their pages to set the default image, description and title for this to happen. If those meta tags are not set, the first image on the page will be the default along with other generic information Facebook is able to scrape from the page.
If you want to test out a few pages and see what information they have set, use Facebook's URL lint tool (https://developers.facebook.com/tools/debug). Simply copy and paste any URL in there.

Resources