Hello, when i share from my website (i made a facebook app) to my facebook account, the post doesnt show an image of the post i share? I mean it shows the text i have written, it shows the name of the app, it redirects to my website (app) but it doesnt show any image although there are images on the page i share. Any hints?

Recommended Answers

It's only going to share one image from the page. You can use the Open Graph syntax to tell Facebook which image you want that to be.

<meta property="og:image" content="http://www.example.com/image.gif" />

More information at:

Jump to Post

All 2 Replies

Thanks Dani. I have created an Open Graph story. Maybe you can clear something for me... I am thinking of using the PHP SDK code provided by Facebook

here is the code

$response = $facebook->api(
    'og:url' => http://samples.ogp.me/407704082730386,
    'og:title' => Sample Art,
    'og:type' => rovespier:art,
    'og:image' => https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png,
    'og:description' => ,
    'fb:app_id' => 34954712323
  1. I dont know if there is more than this php code to implement to my site to show image, title etc
  2. Where do i put the code? Anywhere i want?
    this is the facebook code i use to share and like

                          window.fbAsyncInit = function() {
                              appId      : '34954712323',
                              xfbml      : true,
                              version    : 'v2.1'
                          (function(d, s, id){
                             var js, fjs = d.getElementsByTagName(s)[0];
                             if (d.getElementById(id)) {return;}
                             js = d.createElement(s); js.id = id;
                             js.src = "//connect.facebook.net/en_US/sdk.js";
                             fjs.parentNode.insertBefore(js, fjs);
                           }(document, 'script', 'facebook-jssdk'));
         method: 'share_open_graph',
         action_type: 'og.likes',
         action_properties: JSON.stringify({
        }, function(response){});
                        <div class="fb-like" data-share="true" data-width="250" data-show-faces="true">
  3. I am trying to put my variable next to 'og:image' => https:'.$base_url.$profile_path.$row['profile_pic'];
    and i make getting an error. So i know that this is wrong.

This is the http code i got from facebook

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.