1

I am trying to upload a Spherical Image to Facebook from S3. by doing the following

begin
    @client.put_picture("https://s3.amazonaws.com/skreem-dev/PANO_20160717_120803_1.jpg", { allow_spherical_photo: true })  
rescue Exception => e  
    print e.inspect
end

It returns the following Error Message

#<Koala::Facebook::ServerError: type: OAuthException, code: 1, message: An unknown error has occurred. [HTTP 500]>

It works with any normal images from the same s3 bucket

** UPDATE 1 **

Tried to upload the same image from Godaddy and i am facing the same issue.

** UPDATE 2 ** Tried to upload via Graphy API Explorer, but getting the same error

{
  "error": {
    "message": "An unknown error has occurred.",
    "type": "OAuthException",
    "code": 1,
    "fbtrace_id": "CWqqwQ3WBq+"
  }
}

enter image description here

Harsha M V
  • 54,075
  • 125
  • 354
  • 529
  • Did you set up the Bucket policy and CORS for the Bucket from where you are sharing the Image? – Piyush Patil Jul 29 '16 at 12:46
  • @error2007s okay. this is something new. can you please point me to something i can read about this – Harsha M V Jul 29 '16 at 12:50
  • 1
    You said normal images are showing but not the spherical so I guess the issue is different here I was checking out this guide of setup but not sure the Policy and CORS is issue, if that was issue the images will not show up at all. http://ivrpa.org/news/hosting-360-vr-panoramas-on-amazon-web-services-s3/ – Piyush Patil Jul 29 '16 at 12:52
  • @error2007s yeah :( – Harsha M V Jul 29 '16 at 12:54

1 Answers1

1

I think that your almost 15Mb image is too large. The error you are getting from Koala is not that accurate, you can try to upload it from the Facebook API explorer https://developers.facebook.com/tools/explorer and see.

Also, check the token you're using, as this is throwing an OAuth error. It could be expired.

CV-Gate
  • 1,162
  • 1
  • 10
  • 19
  • How can i upload photo from the explorer? – Harsha M V Jul 29 '16 at 14:12
  • First get an access token and select permissions. You can click on the `GET TOKEN` button. After this you can select a `POST`action and have a look to the Facebook API docs to see how your request should be. Sorry but it's a long time since I don't use this API and I don't know the exact request for the current version. – CV-Gate Jul 29 '16 at 15:12
  • So, everything indicates that the image is too large. Can you try with another one? – CV-Gate Jul 30 '16 at 09:06
  • I can upload the same image if the image is in localhost :( – Harsha M V Jul 30 '16 at 11:15
  • Interesting... Did you try to configure the timeout options of Koala? As seen here: https://github.com/arsduo/koala/wiki/HTTP-Services – CV-Gate Jul 31 '16 at 10:41
  • @CV-Gale any idea where i can set it. Read through that part not able to understand how to set it – Harsha M V Jul 31 '16 at 17:01
  • I'd do it in config/initializers/koala.rb – CV-Gate Aug 01 '16 at 08:37