Found a work around for it if any one else faces this problem later.
Got the answer from this article.
How to share your panoramas on Facebook
"To do this, you must upload the panorama to another website, then share a link to the image on Facebook. An example of this can be seen on our Facebook page .
I?ve tested lots of sites that allow you to do this and found Dermandar to be very easy to use and it?s free!
Dermandar will allow images up to 8191 pixels in either direction, which means you won?t be able to upload the images until you reduce the size a bit.
For that task, my favorite photo management software, Google?s Picasa does the trick.
Not only can it help you resize the image, it?s a great way to unload space-hogging images off your phone so you don?t fill it up with panoramas.
Simply connect your phone to your computer and click on the Import button in Picasa to transfer the images.
Once you have them on your computer, click on the panorama you want to upload, then click the ?File? menu and select ?Export Picture to Folder?.
When the dialog box comes up, type ?8191? into the box below the ?Resize to:? option and click on the Export button."
Although I skipped the whole Dermander part and went straight to changing the pixels on Picasa and exporting the panoramic photo through there. I didn't notice any negative change to the picture quality as well.