1
FacebookグラフAPIを使用してユーザーのDOB情報を取得します。私は完全なDOBを得たが、私は出力がMM/DD/YYYY
のみ月と日を取得する方法であるユーザーの誕生日を取得する方法グラフapi
$graph_url ="https://graph.facebook.com/me?fields=id,first_name,name,gender,location,birthday&access_token=" . $accessToken;
$user = json_decode(get_html($graph_url));
echo $user->birthday
のみの日と月を必要としています。おかげさまで
おかげ数字で表示するにはどのように応答するために –
出力は、私は必要な8月/金のような文字であります8/5のような数字 –
PHPの日付マニュアルをceck。それは簡単です 'echo date( 'm/d'、strtotime($ user-> birthday)); ' –