この URL でデータを取得しようとしています。
https://graph.facebook.com/me?access_token=(my access token)
ブラウザでこのアドレスにアクセスすると、機能します。しかし、Ruby on Rails でrest-client gem を次のように使用しようとしています。
url = 'https://graph.facebook.com/me/home?access_token=' + access_token
result = RestClient.get url
p result
しかし、次のエラー メッセージが表示されます。
URI::InvalidURIError in AuthenticationsController#index
bad URI(is not URI?): https://graph.facebook.com/me/home?access_token=(my access token)
ここで何が間違っていますか?access_token のフォーマットと何か関係があるのでしょうか? 上記のコードでは省略しましたが、これは次の形式です。
1xxx
読んでくれてありがとう。