Facebook Error Message: Requires valid next URL.
June 16th, 2010 • facebook, php, snippets • No comments
Let me start with asking you a few questions!
- Are you having issues with the Facebook API?
- Are you constantly getting the error message “API Error Code: 100 API Error Description: Invalid parameter Error Message: Requires valid next URL.“?
- Are you using the latest official Facebook PHP class?
- Are you redirecting using the PHP header() function?
Well, I might have a solution for you. When calling the function getLoginUrl in the Facebook PHP class, the function will return a HTML encoded string. When outputing this string to your browser, it is rendered/decoded by a browser and this will convert all “safe” charachters to their textual equivalent. This makes that “&” becomes “&” and “%20″ becomes ” “.
However, when using the header() function in PHP, this url will not be rendered/decoded and you are basically sending out a garbled request.
Original
getLoginUrl($params);
header('Location:' . $url);
Solution:
getLoginUrl($params);
$url = str_replace('&','&',urldecode($url));
header('Location:' . $url);
Tekken Movie Trailer
January 15th, 2010 • random • No comments
Even if the story might suck, I’ll be looking forward to the intense fighting scenes… and perhaps the girls in the skimpy suits
mysqli for WordPress 2.9.1
January 7th, 2010 • freebies, mysql, patch, wordpress • 3 comments
WordPress does not officialy support the mysqli drivers. I needed my WordPress installation to use the mysqli class instead of the mysql ones. I’m sure there will be someone else out there with the same needs I decided to place the modified database class and the patch file online. Use whichever you prefer.
WordPress mysqli 2.9 Database Class Patch
December 30th, 2009 • freebies, patch, php, wordpress • 3 comments
WordPress does not officialy support the mysqli drivers. I needed my WordPress installation to use the mysqli class instead of the mysql ones. I’m sure there will be someone else out there with the same needs I decided to place the modified database class and the patch file online. Use whichever you prefer.
Drupal Hacker
December 10th, 2009 • drupal, hack • No comments
To better share my experience with Drupal to everyone, I’ve set up a new domain http://www.drupal-hacker.com .
Drupal is an awesome product, we all know that. But we also know that not everything works as we expect it and that any software might have it’s quirks. Here at Drupal Hacker, I try to smooth out these problems by providing patches to unmaintained modules or to ignored bugs. Last… don’t take all the sarcasm too seriously!

Recent Comments