Can't create a new open graph achievement - facebook

I keep getting the error:
"The given selector string \"game:points\" is invalid for Ent with ID 10150679224277659"
when trying to create a new achievement
(using https://graph.facebook.com/myappid/achievements/?method=post&access_token=...achievement=newurl)
this new achievement is totally different and has a different URL so why it keeps telling me about the other ID (10150679224277659) in this error?
Any ideas?

The URL you're trying to share must be already detected as a different object; are you using an og:url tag on the avchievement URLs which point to another page?
According to http://graph.facebook.com/10150679224277659 that's of type 'game'
THE URL of that object (http://apps.facebook.com/rummikubilan/themes/rummikub/achievement/win.aspx?title=3+parrots+in+a+row&description=Ilan+earned+3+parrots+in+Rummikubs+Jungle+World+and+won+25+Joker+credits\u002521\u002521+Super+cool\u002521&amount=25) doesn't look right - it seems to have a description there which wouldn't make sense for an achievement because there's a name hardcoded into it.
Putting that URL through the debugger doesn't work either, When i go there via HTTPS it fails because you've not configured the secure URL, and in HTTP mode it fails with a 404 error:
You should probably start with a different URL path for the achievements and make sure the meta tags are correct and resolvable, and that the og:url tags don't redirect elsewhere; the Achievement docs have some good examples: https://developers.facebook.com/docs/achievements/

Related

Unable to create custom facebook object

I'm making a Facebook canvas application, and I want give some of the objects there "Facebook presence" - I want to allow users to comment on them and to like and share them via Facebook.
I understand I need to do it via OpenGraph. So I created an object type on my OpenGraph and named it item. I've tried to create an instance of item with the following POST request:
url:
https://graph.facebook.com/https://graph.facebook.com/me/objects/ilender_local-test:item
body:
method=POST&object=%7B%22type%22%3A%22%5C%22ilender_local-test%3Aitem%5C%22%22%2C%22title%22%3A%22My+First+Item%22%7D&access_token=...
The access_token, ofcourse, is the access token for my app.
Now, the result I get is a simple JSON false - no error message - but I assume I failed since when I succeed in creating an object on Facebook I usually get the id of the newly created object.
What am I doing wrong?
My stupidity knows no end. https://graph.facebook.com/https://graph.facebook.com? What was I thinking...

Facebook like button not showing when using a dynamic app id

I'm building a website for a franchise organization that has many franchisees. Each franchisee claims it's own part of the site represented within the path - for example the main site url is bigcompany.com and the the Atlanta store url will be bigcompany.com/atlanta. When trying to place the like button on the page it works when given the main organization's app id, but shows nothing when given the franchise app id.
I've tried using the url debugger on facebook (https://developers.facebook.com/tools/debug/) and the error that I receive is
Object Invalid Value: Object at URL 'http://bigcompany.com/atlanta' of `type 'website' is invalid because the given value '12345678901' for property 'fb:admins' could not be parsed as type 'fbid'.`
I'm not sure what that means and haven't found a suitable answer so far.
Why is the like button not showing? Thanks

Facebook Open Graph - still display wrong image

My Open Graph publish action still display in the wall incorrect image. I've tried to clean cache in the browser - didn't help...
Also I've tried to empty FB OG cache this way (in the Facebook Object Debugger):
http://my-website.com/my-app/?fbrefresh=CAN_BE_ANYTHING
but got this error:
Object Invalid Value: Object at URL 'http://my-website.com/my-app/?fbrefresh=CAN_BE_ANYTHING' of type 'app_url_name:object_name' is invalid because the given value '' for property 'og:url' could not be parsed as type 'url'.
I'ev read that Facebook clean up the cache each 24 hours, but this is already third day...
So, how could I empty the cache, if the attempts above don't works?
You have to fix your og:url value before the cache can be cleared.
What's the result of http://developers.facebook.com/tools/debug/og/echo?q=http://YOUR_OBJECT_URL
(Note that it is the URL of the Open Graph Object you have to use.)

Trying to get OAuth dialog to work

I am at this step in getting my app started in the documentation:
https://developers.facebook.com/docs/appsonfacebook/tutorial/#auth
In there is a code block that (supposedly) forwards the user to a request dialog asking permission to access certain bit of information about them. I've placed this code block into the PHP script that my canvas URL points to, and changed the $app_id and $canvas_page to my application ID and canvas URL respectively. Instead of getting the expected dialog, I receive this following error from facebook:
"An error occurred. Please try again later."
No other details about the error are present. I've tried some variations of the script, and have even tried loading up this URL directly just to see if that would work. Note that I've replaced YOUR_APP_ID and YOUR_CANVAS_PAGE with the appropriate values and made sure that spelling and/or punctuation are correct:
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGE&scope=email,read_stream
For the redirect URL, I've tried prepending it with http://, https://, and no prefix at all. All with the same result.
My question: is the example in the documentation broken, or is the oauth link provided in the documentation currently down? The vague nature of the error is somewhat frustrating since I can't tell if it's something I'm doing wrong or if it's facebook's oauth function that's at fault.
So, the problem was that instead of using the numeric application ID that facebook assigned for me when I originally created the app as the YOUR_APP_ID parameter in the OAuth URL, I was using the application namespace string. Facebook didn't understand this sort of request, and returned the generic error message.
Once I used the numeric app ID, the OAuth dialog popped up to ask permission to access my account, as expected.

Facebook linter (aka "object debugger") complains about my URL, but everything seems ok

My site has some URLs that are rewritten by .htaccess... i.e. this:
http://lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica
is invisibly re-written to:
http://lastminuteislandvacation.com/villa.php?id=15
However, when I plug all this in the Facebook Linter, I get this error message:
"Errors That Must Be Fixed: There was an error in fetching the object at URL
'http://lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica',
or one of the the URLs specified via a redirect or the 'og:url'
property including one of
http://www.lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica."
What does that mean, and is it a problem I need to worry about or is it just the Linter complaining?
FWIW as far as I can tell, all my open graph tags on the page are fine, and there's nothing unusual about rewriting a URL via .htaccess. My shares on Facebook seem to look and work correctly, with all the right metadata, image, etc. In other words: there's no problem that I can see, but that whole "Errors That Must Be Fixed" part has me mildly concerned.
When I try your urls in the debugger the results I get are just fine, there are no errors what so ever.
For the short (.php) version I get this:
Fetched URL: http://lastminuteislandvacation.com/villa.php?id=15
Canonical URL: http://lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica
URL for Likes: http://lastminuteislandvacation.com/villa.php?id=15
And for the longer one I get this:
Fetched URL: http://lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica
Canonical URL: http://lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica
In the Scrape Information section.
Also, at the bottom (Urls section) you can see that they both get the same Graph API url