Hi
I want to create a page in my facebook app which lets user upload an image from their system. How can I do this? The image will be stored on my server and not in the user's photos.
Thanks.
Hi
I want to create a page in my facebook app which lets user upload an image from their system. How can I do this? The image will be stored on my server and not in the user's photos.
Thanks.
there are many languages that do the functionality your requesting, I would suggest PHP since FB runs on that. A quick Google Search should pull up all the info and code you might need to complete the image upload as you have requested, but just in case here is a simple tutorial. Also you will need to create the FB app which they offer a great API and resources.
<form action="action.php"
enctype="multipart/form-data" method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30" />
</p>
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile" size="40" />
</p>
<div>
<input type="submit" value="Send" />
</div>
</form>
In action.php:
if ($_FILES["datafile"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"];
}
else
{
echo "Upload: " . $_FILES["datafile"]["name"];
echo "Type: " . $_FILES["datafile"]["type"];
echo "Size: " . ($_FILES["datafile"]["size"] / 1024) . " Kb";
echo "Stored in: " . $_FILES["datafile"]["tmp_name"];
}