I'm trying to create a real time subscription on the Instagram API using R and the httr package but I'm struggling with the PubSubHubbub authentication.
Here's the code I use:
require(httr)
r = POST(url = 'https://api.instagram.com/v1/subscriptions',
body = "client_id=XXXXX;client_secret=XXXX;aspect=media;access_token=XXXX;callback_url=http://localhost:1410/;object=tag;object_id=selfie",
encode = "form",
verbose()
)
str(content(r))
The error message I'm getting is:
..$ error_message: chr "Invalid URL. The URL may be on a private network."
Now I understand that the Instagram api can't reach http://localhost:1410/, yet, this is the call back url given by the oauth_callback() function from the httr package.
Any help would and guidance be very much appreciated.
Thanks