Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Object is of Type Website" error when trying to publish custom action
    primarykey
    data
    text
    <p>When I try to publish a custom action I am get an error (below) claiming that the URL representing my object is of type website. As you can see from my object html I have included a. og:type '{app_namespace}:{object_name}' tag, in fact this code was mostly generated by the developer app. I have successfully published custom actions in the past for other apps and I cannot figure out what is different this time. Any suggestions would be appreciated.</p> <p>Facebook Error:</p> <pre><code>{"error":{"message":"(#3502) Object at URL {URL} has og:type of 'website'. The property 'issue' requires an object of og:type '{app_namespace}:{object_name}'. ","type":"OAuthException","code":3502}} </code></pre> <p>Object Html:</p> <pre><code>&lt;html&gt; &lt;head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# {app_namespace}: http://ogp.me/ns/fb/{app_namespace}#"&gt; &lt;meta property="og:type" content="{app_namespace}:{object_name}" /&gt; &lt;meta property="fb:app_id" content="{app_id}" /&gt; &lt;meta property="og:url" content={URL for this Html} /&gt; &lt;meta property="og:title" content="Sample title" /&gt; &lt;meta property="og:image" content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" /&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Code I'm using to publish the action:</p> <p> </p> <pre><code>&lt;head&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function clickHandler() { FB.getLoginStatus(function (response) { if (response.authResponse) { FB.api('/me/{app_namespace}:{action_name}?{object_name}={object_url}', 'post', function (response) { alert(JSON.stringify(response)); }); } else { //If user not logged in initiate login process FB.login(function (response) { if (response.authResponse) { FB.api('/me/{app_namespace}:{action_name}?{object_name}={object_url}', 'post', function (response) { alert(JSON.stringify(response)); }); //actionPublish(); } else { //user cancelled login or did not grant authorization } }, { scope: 'publish_actions' }); } }); } $(document).ready(function () { window.fbAsyncInit = function () { FB.init({ appId: '{app_id}', status: true, cookie: true, xfbml: true, oauth: true }); // run once with current status and whenever the status changes FB.getLoginStatus(updateButton); FB.Event.subscribe('auth.statusChange', updateButton); }; (function () { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; $("#fb-root").append(e); }()); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;button id="publishButton" onclick=clickHandler(); return false " &gt;Publish&lt;/button&gt; &lt;/body&gt; </code></pre> <p></p> <p>Edit:</p> <p>If I paste the fb object URL into the debug tool I get the following error:</p> <p>"There was an error in fetching the object at URL 'http://www.thepropagator.com/takeAction/draft_1/demos3/issue_4.php', or one of the the URLs specified via a redirect or the 'og:url' property including one of <a href="http://www.thepropagator/takeAction/draft_1/demos3/issue_4.php" rel="nofollow">http://www.thepropagator/takeAction/draft_1/demos3/issue_4.php</a>."</p> <p>If I try blocking out the URL tag all together the error goes away, in either case when I try to publish an action Facebook sends back the error saying that the object is of type website.</p>
    singulars
    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