Getting Facebook to pull an Image from a redirect URL - facebook

We have a rather large site that features travel properties.
Each property has its own Property ID #
When a user posts to Facebook using our full property url Facebook pulls the featured property image correctly.
However our urls are long for each property. So we created a shortened redirect for all. www.domain.com/propertyID#.
When a user posts the redirect version on Facebook it fails to scrape an image because the redirect does not have the og:image data.
Is it possible to have Facebook pull the image when the redirect URL is posted? We do not want the redirect URL's to be indexed.

Related

Move facebook likes from one url to another

Over time I have built up a number of facebook likes on page = http://www.andy-howard.com/verticalAndHorizontalAlignment/index.html
But I need to convert this page to a php script (to be content manageable). Most likely it will be = http://www.andy-howard.com/code-help.php?id=143
Is there a way I can transfer my existing facebook likes to the new url?
You can’t transfer likes from one URL to another.
Only thing you can do, is make Facebook “believe” that the URL is still the old one – by setting the og:url meta tag in your new pages to the old URLs.
Facebook will use that value as the canoncial URL to identify this Open Graph object and to fetch the Open Graph information from, so you will have to see to it that those old URLs are
still available for the FB scraper to visit,
give it the OG info it is looking for, and
that “normal” visitors are redirected to the new URL, should Facebook link them to the old one
How to detect that the FB scraper is requesting your page, is described here: https://developers.facebook.com/docs/reference/plugins/like/#scraperinfo
I don't think there is a way to transfer likes from one url to another. Facebook like plugin is designed so that you can be on one page while actually liking completely other page (i.e. url). If that likes really matter, you can save the old url in database for each content and continue collecting likes for that url and just redirect visitors from that url to the new one.

Does Facebook recognize vanity URLs?

I've created a website using a vanity domain extension, http://thatme.me. I've added the necessary OpenGraph meta tags for the urls to display all pretty on Facebook. If a user posts a full URL, for example http://thatme.me/notbad, the OpenGraph data gets pulled and shows the image on the post. However, if a user only types a url like this thatme.me/notbad the URL is not recognized and the OpenGraph data doesn't show.
Is there something I need to do so that those URLs will be recognized or am I just out of luck?

Facebook open graph url redirect issue

I am trying use open graph API to publish an action. URL that I provide as part of meta data property og:url can be accessed by authenticated users only. Facebook is trying to scrape the URL and is ending up with a sign_in page due to a 302 redirect.
Do I have to construct a page just for facebook scraping with meta tags in it? Isn't this url linked to the content published on facebook?
If you want your articles to be sharable or do any SEO, you shouldn't be using 302 redirects. Bots will only see the content from the destination of the redirect.
You want to have just one URL for each piece of content. If an unauthenticated user, the Facebook Scraper, or Googlebot visits that URL, you want it to see all your Meta tags and some teaser content.
If the user isn't authenticated, use a server-side scripting language to display a register/sign_in dialog instead of the premium content. If the user is authenticated, then you show them the full content.
This is better even from a UX perspective: Say I follow the link from Facebook and register. When I sign in, how are you going to get me back to the content I wanted to see in the first place?

Link to fan-page with app_data parameter removes the app_data parameter

I have a FB app in an iframe on a Facebook fan-page. If I create a URL linking to that page, and that URL contains an app_data parameter, like this:
https://www.facebook.com/pages/My-Page/123?sk=app_456&app_data=mydata
Then post that in my FB feed, FB strips the app_data parameter, reverting to the canonical URL for the fan page:
https://www.facebook.com/pages/My-Page/123?sk=app_456
Which isn't what I want.
I would consider this a bug, as the state of the application is part of the "canonical" state of the fan page, but for now: Any way to get around this?
I have thought about making the bookmark to my own page:
https://facebook.mysite.com/pages/My-Page/123?sk=app_456&app_data=mydata
and dynamically generate a page with all the OpenGraph tags from the corresponding FB page (to make FB sharing work), and a redirect to the fan page (to get the user to the right place) - but this requires either (a) scraping FB for those OpenGraph tags or (b) accessing the graph.facebook.com api programmatically in a crawl-like fashion, and I don't know what FB thinks of that.
G'Day Leo, might be a bit of a hack but seems to work. I link my app_data onto a separately hosted URL and redirect back to Facebook with it.
So my URL I share is: https://externaldomain.com/deeplinker.aspx?data=stuff
Then response a redirect which is: https://www.facebook.com/[pageurl]?sk=[app]&app_data=[data]
With [data] = stuff

Refresh meta data in posted URL

In Facebook, when I post the link http://wisdomuniversity.org, Fascebook includes old metadata (Title, description, etc.). I recently added Open Graph Protocol meta tags, but Facebook still uses the old stuff. How does Facebook refresh this metadata and can I force a refresh?
You need to ping facebook and notify them to update changes and to do that you can use
URL Linter. It may take some time for facebook to update your changes. I'm not sure how much time they take to update after pinging, but just try it.
EDIT: This is officially from facebook: Open Graph protocol
Editing Meta Tags
You can update the attributes of your page by updating your page's
tags. Note that og:title and og:type are only editable
initially - after your page receives 50 likes the title becomes fixed,
and after your page receives 10,000 likes the type becomes fixed.
These properties are fixed to avoid surprising users who have liked
the page already. Changing the title or type tags after these limits
are reached does nothing, your page retains the original title and
type.
For the changes to be reflected on Facebook, you must force your page
to be scraped. The page is scraped when an admin for the page clicks
the Like button or when the URL is entered into the Facebook URL
Linter. You can programmatically force your page to be scraped by
cURL'ing the linter. For example:
curl
> https://developers.facebook.com/tools/lint/?url={YOUR_URL}&format=json
Use Facebook debbugger and detect the problems related to og FB metadata, https://developers.facebook.com/tools/debug/. Then, if Fb says your image is too small, pull a bigger image and use odd width for the image e.g. 300px, 500px etc. It seems when FB doesn't find the correct image size, title or description, trends to grab main site metadata.
You can update your Open Graph object information but just sending a CURL request, like documented here: https://developers.facebook.com/docs/sharing/opengraph/using-objects
POST https://graph.facebook.com/?id={object-instance-id or object-url}&scrape=true
I hope this helps...
Tool URL has changed to https://developers.facebook.com/tools/debug. Now GET request should be sent to: https://developers.facebook.com/tools/debug/og/object?q={YOUR_URL}.
If you are getting an error "Error parsing input URL, no data was scraped." try to add following header to a request: Referrer: https://developers.facebook.com
As of the end of 2016, the way to programmatically notify Facebook of changes in your URL and have it scrape it again is by submitting a POST to this URL:
https://graph.facebook.com/?id={YOUR_URL}&scrape=true
Earlier ways, some noted on this page, have been deprecated. This is documented here:
The Facebook crawler will re-scrape (and therefore update) objects:
When the object URL is input in the Object Debugger Every 30 days
after the first scrape When an app triggers a scrape using an API
endpoint This Graph API endpoint is simply a call to:
POST /?id={object-instance-id or object-url}&scrape=true
The response from this endpoint will be a JSON object that contains all the
information about the object that was scraped (the same data returned
when the Object ID is read from the Graph API).
The id parameter can be either the canonical URL of your object or the
ID of the object instance in the graph.