Note that there are some explanatory texts on larger screens.

plurals
  1. POAPI Error code: 100 facebook OpenGraph
    primarykey
    data
    text
    <p>I have just started making a new Facebook app hosted on heroku and I haven't made any changes yet, but tested the functionality a little bit, to get used to how stuff works. All good until I try the "send message button", to which a dialog appears with the following error log:</p> <pre><code>An error occurred. Please try later API Error Code: 100 API Error Description: Invalid parameter Error Message: 'link' is invalid. </code></pre> <p>I've looked a bit in the related piece of code, and I find nothing wrong, but I am quite new so maybe any of you can help me a little bit to find out what's wrong:</p> <pre><code> $('#sendToFriends').click(function() { FB.ui( { method : 'send', link : $(this).attr('data-url') }, function (response) { // If response is null the user canceled the dialog if (response != null) { logResponse(response); } } ); }); </code></pre> <p>The reason I don't think there is a problem with <code>$(this).attr('data-url');</code> is that the following works (the post to wall button):</p> <pre><code> $('#postToWall').click(function() { FB.ui( { method : 'feed', link : $(this).attr('data-url') }, function (response) { // If response is null the user canceled the dialog if (response != null) { logResponse(response); } } ); }); } </code></pre> <p>The <code>getUrl()</code> function that gets the value is:</p> <pre><code> public static function getUrl($path = '/') { if (isset($_SERVER['HTTPS']) &amp;&amp; ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { $protocol = 'https://'; } else { $protocol = 'http://'; } return $protocol . $_SERVER['HTTP_HOST'] . $path; </code></pre> <p>}</p> <p>Can anyone please help me? I've searched a bit on facebook developers forum and on stackoverflow, but the although the error code was the same, the error message was different. I think this problem is from facebook since method <code>feed</code> works, while method <code>send</code> does not. Both methods are defined in the facebook sdk </p> <p>Note:I am using the latest php sdk</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload