开发者

Metatags are not shown if "index.php" is shared on Facebook

开发者 https://www.devze.com 2023-03-25 22:21 出处:网络
We have an app running on facebook. Metatags for sharing the link of the app are implemented correctly and working, as long as I am not sharing the index.php.

We have an app running on facebook. Metatags for sharing the link of the app are implemented correctly and working, as long as I am not sharing the index.php.

I implemented exactly the same content into three files:

index.php -> no image or description shown
start.php -> thumbnail and description shown
indextest.php -> thumbnail and description shown

My problem: It must work with the index.php because most people are sharing via the path: http://apps.facebook.com/myapp

So does Facebook just not recognize any files named index.php? And do you have any suggestions how to solve this?

Many thanks!

EDIT: Ooookay! Thanks for all your help guys. It was indeed a caching problem, but not for the files. Every time a user shares a link, facebook saves the given thumbnail and description. This is just hillarious! Because the time until the cache is flushed can sum up to one week! So it would be a very bad idea if you shared a link of your site just to check how it looks, if it is not finish开发者_运维问答ed.

Fortunately this caching is case-sensitive, if you enter a letter in big, that you entered small, facebook will get new contents, but again just for this url. My main url (with small letters) will still not work.

Check here for further information (quite important if you are into facebook development): http://fbmhell.com/2010/10/breaking-facebook-share-cache/

I can answer the question after 8 hours. But still you both helped me had to do with cache and I needed the url tool to find out about this specific caching ;-)


Try using OG tags: http://developers.facebook.com/docs/opengraph/

e.g.:

<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>


Ooookay! Thanks for all your help guys. It was indeed a caching problem, but not for the files. Every time a user shares a link, facebook saves the given thumbnail and description. This is just hillarious! Because the time until the cache is flushed can sum up to one week! So it would be a very bad idea if you shared a link of your site just to check how it looks, if it is not finished.

Fortunately this caching is case-sensitive, if you enter a letter in big, that you entered small, facebook will get new contents, but again just for this url. My main url (with small letters) will no

Check here for further information (quite important if you are into facebook development): http://fbmhell.com/2010/10/breaking-facebook-share-cache/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号