Php – getting The og:url property should be explicitly provided when defining the data-href fb-comments

facebook-graph-apiPHP

I am trying to add fb-comments into my html page that is part of the facebook app
like this :

data-href="http://ec2-107-22-163-16.compute-1.amazonaws.com/?userid=<?php echo $userId ?><?php echo $userTBID ?> "

when i try to render the page im getting this error:

Warning: http://ec2-107-22-163-16.compute-1.amazonaws.com/?userid=55700201320 is unreachable.

but i do access it from the outside world.

now when i click the link , im rederected to the debbuger that tells me this :
Critical Errors That Must Be Fixed
Error Scraping Page:    Bad Response Code

Errors That Must Be Fixed
Missing Required Property:  The og:url property is required, but not present.
Missing Required Property:  The og:type property is required, but not present.
Missing Required Property:  The og:title property is required, but not present.

Open Graph Warnings That Should Be Fixed
Inferred Property:  The og:url property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property:  The og:title property should be explicitly provided, even if a value can be inferred from other tags.  

what is it i just what to be able to add comments widget unique to each user that logedin

UPDATE:
i added the og tags but still when i put the url in debug im getting
Response Code: 403

this is what i added :

<head>
<title>encomia</title>
<meta property="og:title" content="MyAppName"/>
        <meta property="og:url" content="http://ec2-107-22-163-16.compute-1.amazonaws.com/?userid=<?php echo $userId ?><?php echo $userTBID ?>" />
</head>

Best Answer

When I go to:

http://ec2-107-22-163-16.compute-1.amazonaws.com/?userid=55700201320

I get back a 403 forbidden error message.

I'll bet Facebook is seeing this as well and cannot properly lint the url. Accroding to the linter, it says

Error Scraping Page: Bad Response Code

So make sure you send back a 200 code with the real content rather than a 403.

Related Topic