mixi アプリ iOS 6 safari 3rd party cookie対応 | mixi.jp以外はリダイレクトしないように。

http://developer.mixi.co.jp/appli/ns/touch/cookie_enable_api/

iframeを呼ぶときにcreated_atをつけてstartを呼ぶと設定可に変わるということのようですね。

基本そのままですが、1点 set cookie処理の所を

if( preg_match( ‘/^http:\/\/.*mixi.jp/’, $_GET['callback_url'] ) ){
     // set cookie
     setcookie(“created_at”, time(), time() + 2592000);
     header(“Location: ” . $_GET['callback_url']);
     exit;
}else{
// error fuck
}

変なリダイレクトに利用されると困るので
こんな感じでcallback_urlにmixi.jp以外は何もしないようにしました。

This entry was posted on 日曜日, 10月 14th, 2012 at 12:47 AM and is filed under mixi, php, Platform. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。