开发者

CURL a Photo to Facebook that isn't local

So I am trying to use the fac开发者_运维技巧ebook API to send a photo. I've got it all working, but the issue is that due to our server environment (everything is stored at s3) there is no concept of local file paths, so when I'm supposed to do this: 'source' => '@'.realpath($FILE_PATH) I can't because all I technically have is the URL. I know that it doesn't work with URLs. What's my best bet to get this working? Saving a photo locally and then deleting it after uploading is an option, but seems like a horrible waste of bandwidth....


A quick glance at the curl documentation suggests that you'll need to do what you're suggesting. Downloading a file locally just to upload does seem like a horrible waste of bandwidth, however, it may be necessary in this case. Unless the facebook API supports URLs in addition to files, I can't immediately see an alternative.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜