Facebook and twitter share for mobile web

前端 未结 4 2246
执笔经年
执笔经年 2021-01-30 09:24

Is there a special url for sharing to Facebook and Twitter for mobile? Or are they the same as those from websites?

Using



        
4条回答
  •  醉梦人生
    2021-01-30 10:05

    The url is ok, but you need to do some work on your server to get Facebook to really make it look decent. Facebook now uses "Open Graph", which allows you to add special tags to your web page that Facebook understands. You can define what types of media are on the page, even add your own objects with definitions you create inside your Facebook app. The link to the developer Open Graph objects page is Here.

    A sample of Open Graph on a detail page might look like this:

     
     
    
    
    
    
       
    
    

    And so on. This all goes in the of the page of the actual url you are supplying to Facebook. Then Facebook will translate this into the appropriate post. In addition, you need to set up the Open Graph on your apps developer page, so that Facebook knows to look for the og: tags. It's complicated, but it does work.

    Good luck!

提交回复
热议问题