将照片从照片URL上传到用户个人资料,而不是输入文件字段 [英] Upload photo to users profile from photo URL, not input file field

查看:132
本文介绍了将照片从照片URL上传到用户个人资料,而不是输入文件字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过了许多文件上传示例,但是还没有找到一种方法来强制用户发布照片。

I have been through many of the file upload examples, but have not found a method to force the photo for the user to publish.

此示例显示用户如何从计算机上传照片:
http://developers.facebook.com/blog/post/498

This example shows how a user uploads the photo from their computer: http://developers.facebook.com/blog/post/498

我想使用这种方法,但用图像URL替换[文件输入浏览]字段,以便用户看到它显示,并且应用程序在点击提交按钮时将其发布到他们的配置文件。任何帮助将不胜感激。

I would like to use this method, but replace the [file input "browse"] field with the image URL so that the user would see it displayed, and the app would post it to their profile when they click the submit button. Any help would be greatly appreciated.

推荐答案

您需要做的是让用户将照片上传到您的服务器上传到Facebook。我建议使用这个伟大的插件 Uploadify 。它是一个AJAX文件上传器,您可以在上传过程中完成回调。当您收到 uploadComplete 回调时,您可以在将图像提交给Facebook之前向用户显示图像。要将照片提交给Facebook,我建议您按照@Abdur的其他答案中列出的其中一个教程。

What you will have to do is let the user upload the photo to your server before uploading it to Facebook. I recommend using this great plugin called Uploadify. It is an AJAX file uploader, you can get callbacks during the upload process and on completion. When you receive an uploadComplete callback you can display the image to your user before allowing him to submit the image to Facebook. For submitting the photo to Facebook I recommend following one of the tutorials listed in the other answer by @Abdur.

这篇关于将照片从照片URL上传到用户个人资料,而不是输入文件字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆