Search code examples
phpfacebookfacebook-graph-apifacebook-wall

Facebook Wallpost Malfunctioning


I have created an application on facebook which sends the wall post on user registeration the wall post is working as expected but i am facing the strange issue when wall post is displayed in generalized form it displays my server path instead of caption and name i have used in wall post see this pictureenter image description here

when i visit the posts individually it displays perfect with caption and name.


Solution

  • Facebook fetches meta data from a page when people share the link. Therefore you can add some in your page for the case.

    First of all, at least add "og:title", "og:description" and "og:image" to your page. Like below:

    <head>
        <meta charset="utf-8"> 
        <title>title</title>
        <meta property="og:title" content="title" />
        <meta property="og:description" content="the description about your page" />
        <meta property="og:image" content="http://domain.com/images/logo.jpg" />
    </head>
    

    then go to http://developers.facebook.com/tools/debug and type in the url of your page to see what facebook fetched.