usernameを設定しているとurlからuseridがなくなるので、metaタグにuseridを指定したい時とかに困る。
そんなときは、以下のurlの{username}の部分をuseridを知りたいユーザーのusernameにする。
https://graph.facebook.com/{username}
例えば僕の場合、↓こんな感じ。
https://graph.facebook.com/chris4403
上記アドレスにアクセスすると、JSONが出力される。
{ "id": "777253728", "name": "Yoshiomi Kurisu", "first_name": "Yoshiomi", "last_name": "Kurisu", "link": "https://www.facebook.com/chris4403", "username": "chris4403", "gender": "male", "locale": "en_US" }
これのid部分がuserid。