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
}
精彩评论