开发者

Alternative content for facebook share

I'm trying to prepare alternative contet for facebook sharing. Site is based on flash player (flash is required to enter site) so facebook share shows only:

'To view this page ensure that Adobe Flash Player version 开发者_开发知识库10.0.0 or greater is installed.'

Is there any possibility to heck if request is send from facebook and display alternative text / thumb image?

I was trying to play with $_SERVER - without result.

Thanks in advance.


According to quora the user agent contains the word facebook in it suprise suprise so you could just do...

if (stripos($_SERVER['HTTP_USER_AGENT'], 'facebook') !== false) {
  // show html for facebook
}
else {
  // show flash
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜