Hi All,
I’m working on a facebook app that will run throug an ee template. This works just fine exept for one problem I have: FB directs to to page through an iFrame and add a query string something like: www.site.com/facebook/app_template?code=3092084fsldhfskhdfalotofstuffhere
Ee will redirect to the 404 page when it encounters a string like that. What can I do to prevent that?
Thanks!
EDIT: Found a solution just so I can continue:
{if "{exp:ds_fb_app_helper:facebook_request test='code'}" == "FACEBOOK_REQUEST"}{embed='facebook/fb_stem_actie'}{if:else} Continue normal index template code --->First 404 shoud go to index page. In my plugin I have a function that determines if there is a query string coming from Facebook, if it’s the case it returns true and I embed the Facebook template to the index…. not nice, but works for now.
Hi Sanity11,
ExpressionEngine can behave oddly with the addition of a second query string.
You are probably aware, but EE used masked query strings to make URLs.
It’s expecting:
?code=3092084fsldhfskhdfalotofstuffhereTo be a url_title or entry_id.
There are some folks who have managed a way around this using .htaccess This example pertains to google, but a smarter person than I could mould it into a solution here:
#Catch any Google campaigns directed to the home page
RewriteCond %{REQUEST_URI} ^/index.php$
RewriteCond %{QUERY_STRING} ^(gclid=.*)
RewriteRule ^(.*)$ /index.php?/ [L,PT]Would you like me to move this to the more appropriate Development and Programming forum?
Cheers,
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.