Take the 2-minute tour ×

I have implemented exactly the code which is shown on this page: http://developers.facebook.com/docs/reference/dialogs/feed/

Problem: All the fields in the object are filled correctly, and also posted correctly to facebook, except the picture.


if(isset($_POST['successmessage'])) {

    echo '<div class="info_message" style="margin:0 10px 10px 10px">
            <div style="float:left;display:inline;width:200px">
                <strong>'.$lang['checkout_text_42'].' '.$lang['checkout_text_43'].'</strong>
            <div style="float:left;display:inline">
                <a onclick="postToFeed(); return false;" style="cursor:pointer;float:left"><img src="images/post-design-to-fb.png" style="margin-top:4px"></a>
                <div id="msg" style="line-height:34px;float:left;margin-left:10px"></div>
            <div style="clear:left"></div>


    <script src='http://connect.facebook.net/<?php echo $locale; ?>/all.js'></script>
      FB.init({appId: "123455666777", status: true, cookie: true });

      function postToFeed() {

        // calling the API ...
        var obj = {
          method: 'feed',
          link: 'http://www.mydomain.com/configurator.php?id=<?php echo $_SESSION['sharetofb'];?>&lang=<?php echo $language;?>',
          picture: 'http://www.mydomain.com/images/designs/design-<?php echo $_SESSION['sharetofb'];?>.png',
          name: 'I just designed a DIY T-Shirt. Awesome!',
          caption: 'Click to check it out and customize it.',
          description: 'Choose from 500 different materials, colors, prints, shapes to assemble your unique custom T-Shirt.'

        function callback(response) {

            if (response && response['post_id']) {
               document.getElementById('msg').innerHTML = "Your design was posted successfully!";


        FB.ui(obj, callback);





If I use the Direct URL Example given on the above mentioned facebook doc and copy/paste the url into the browser (substituted with my App ID and URL and content), it also shows everything except the picture.

The strange thing is: It showed and posted the picture yesterday. However after several times of testing and posting and deleting the the test posts from my wall, it didn't post the picture anymore.

I searched all the questions and answers here on stackoverflow and can exclude that it is a problem of having dashes in the picture url. I really cannot figure it out and are close to asuming that facebook is blocking post pictures if done too often??

Appreciate any hint which can lead me to the solution.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Have you tried to use a static picture? Is it working? Maybe it depends on the variable you pass to it.

share|improve this answer
Yes, I tried static, with dash and without, jpg, png. all not working –  Rolf Jul 18 '12 at 12:18
Have you tried with https? Can you paste here the direct link to the image? –  Eduard Jul 18 '12 at 14:47
Here is a link to the image: juuway.com/images/designs/juuwaydesign304.png I removed the dashes in the url also from the code, just to clarify. –  Rolf Jul 18 '12 at 15:26
As I imagined, it prompts for username and pass :) So FB cannot access it :D Remove htpasswd for a second and try again. –  Eduard Jul 18 '12 at 17:17
Yes, that was it, it's working now. Thanks. –  Rolf Jul 20 '12 at 1:06
add comment

Your Answer


