php - Achievements rescrape fail. Error #3403 Achievement hasn't been Registered -


let me start saying established app 51 established achievement working past couple of years until few days ago.

i believe created mess making small changes page scraped facebook achievements system. achievement urls have not changed error logs alerted me spelling mistake in og:url tag rectified it, along corresponding file name.

fastidiousness not pay seems.

since whenever system attempts award achievement, error:

e: (#3403) achievement hasn't been registered application. 

so tried re-scraping achievements via open graph object debugger , via calls api so:

try{     $request = new facebookrequest( $adminsession,         'post',          "/?id=". fb_metro_ach_url_base . $achievementid . '&scrape=true'         );     $response = $request->execute(); }catch ..... 

i expected have 1 of methods anyway after having made changes.

in object debugger, scrape goes fine no warnings. api re-scrape goes without hitch , displays each achievement correctly , in full , correct app id.

taking unique id of achievements , viewing them in object browser looks fine.

general api calls display achievements registered app, this:

try{     $request = new facebookrequest( $adminsession,          'get',          "/" . app_id .   "/achievements"         );     $response = $request->execute(); }catch ..... 

return full list 1 expect, no errors or warnings, yet problem persists.

naturally i've pulled relevant files out of version control , reinstated originals, forcing re-scrape along way, no dice.

pulling hair out advice appreciated.

ok, i've figured out, had 2 dynamic urls achievements achievementdescription.php achievementcontent.php

achievementdescription.php used register achievements facebook few years ago. contained within meta tags was:

<meta property="og:url" content="http://example.com/achievementcontent.php?aid=<?=$aid?>"/> 

the strange thing achievementcontent.php never existed, having been misspelled in file name @ creation. correcting matter made facebook see new achievement seems.

with attempted 'fix' i.e. having correctly named , located achievementcontent.php, took @igy's advice , attempted re-register 1 of existing achievements , found created new duplicate achievement linked achievementcontent.php url (all pre-existing achievements linked achievementdescription.php)

so, i'm guessing scraping procedure has been upgraded @ facebook end in interim. original registration system must have tried follow broken link , assigned achievement achievementdescription.php url. attempting rescrape achievement in newer system, without valid destination og:url, caused fail.

setting og:url property self reference achievementdescription.php i.e.

<meta property="og:url" content="http://example.com/achievementdescription.php?aid=<?=$aid?>"/> 

and re-registering achievements has caused facebook system start recognizing achievements again , able award them players, importantly has done without creating duplicate achievements app.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -