1
votes

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?

1

1 Answers

0
votes

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?