I have a legacy registration system , whic takes a file input as a field for the user to upload their profile picture. I am now using opengraph to supplement this system. I am able to connect successfully, but am stuck at how to connect the to the link of the picture that i get from facebook.
Any ideas
http://graph.facebook.com/the-username/picture alway redirects to the picture in thumbnail
here for a larger version:
http://graph.facebook.com/username/picture?type=large
you can also do an fql query in the user table for several fields which are listed here:
http://developers.facebook.com/docs/reference/fql/user
Related
I'm creating a social app similar to instagram on Android studio.
Users will be able to upload and view photos in this app.
The photos are saved on a Cloud in a folder called "ProfileImage" and the URL of the photos is saved on the MySql database, along with the ID of the photo and the user's ID.
To get the photos I would like to use Picasso.
If for example the user A wants to look at his photos, the app will have to show him only his photos, that is I will have to get the URLs of the photos that have the id of the user A.
Picasso to get the photos use the following code Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView);
But the problem is that I don't know the specific URL of the photos.
One solution I thought of is to get the URLs of the photos via PHP and pass them into an android variable that I will use as a URL variable for Picasso.
But this solution seems slow to me, in the sense that the photo will not be displayed immediately, but seconds will have to pass.
Can anyone recommend a faster and perhaps better solution than mine?
First of all, Upload your image to server and save image url inside mysql database not image itself. Create one api that returns user info including image url.
I currently develop a registration form with profile picture. The user need to browse the picture from gallery and select one from there as profile picture. After that, the user will submit the form through HTTP post to insert the whole information into MySQL database using PHP script.
Now, I facing problem in create a form to upload the picture in my android emulator. I co not know how to create one.
Currently, I using SDK 10 for android version 2.3.3.
Check this tutorial. It will help you: http://www.coderzheaven.com/2011/04/25/android-upload-an-image-to-a-server/
I'm trying to build an app on Facebook where users can upload their images, share it on their wall and get their friends to 'Like' their photo.
I'm not pretty sure how to do it, I have a page where a user uploads their picture and I would like them to have their own page upon picture uploaded so that their Facebook friends can 'Like' it.
Can I have 1 page with values or do I need to auto generate for each users?
This is like a Photo Contest.
You could use mysql database to store the data and call it using php when you want to see it, you will only have to create on page, and can automatically update itself when someone uploads a new picture, send to facebook and then store that data into the database so that it can easily be referenced again.
I'm putting together an application in facebook, part of which requires a user to input a bunch of information into a form, including a video and a number of text fields.
For my application, I'm using a combination of HTML, PHP, mySQL and Javascript.
I want to be able to upload the users video file to facebook using the PHP SDK in the same page as I am inserting their info into my database. I want something similiar to the photo solution here: Exception when uploading photo with Facebook Graph API. But I'm not sure what the array key should be for the video itself.
Can any give me any ideas?
My apologies,
I realized that the solution I linked to works. However, you have to give facebook time to process the video, otherwise the graph api replies false.
I have seen a Fan page wall being tagged in a photos caption.
http://www.facebook.com/photo.php?fbid=165019486869988
Notice its in the Caption itself, and its a Fan page that was tagged, not a person.
How was this done? I actually cant even see how to do it manually on Facebook.
Can it be done in a Facebook PHP App? If so how?
So when my application posts to the users "Application Photo Album" the caption would have a link back to my apps fan page or app page.
This would all involve databases, and I have done something like this before. It is pretty involved the way facebook does it because they also link back to the tagged users page.
You would have to have a unique user ID for each user and a unique photo ID for each photo.
When a person pulls up the image the web site would query the MySQL Database and look for the record that matches the Photo ID, then it would look for the tagged User ID's that are attached to that Photo ID, which would be stored under that database record when the user was tagged.
The web site would then echo out the results of the database query to retrieve all of the tagged User ID's and you would have to then make the User ID's appear as the users name, which would require a function to take that User ID and query another database that will retrieve the users actual name and return it to the script.
The question you asked is very general and I can go on all day about the technicalities behind it, but I hope this gave you a general idea of how it can be done with PHP/MySQL.
Please let me know if you have any questions!!
I figured out that you can tag a fan page if you actually upload the image via your wall "Post Picture" then in the status message as your posting it you can tag the fan page #FanPage just like when you tag a friend in your status message.
Still not able to do this via programming.
Well i found a simpler solution to the same that uses the graph api
http://developers.facebook.com/docs/reference/api/photo/
You can specify which user to tag using two methods: in the URL path as PHOTO_ID/tags/USER_ID, or in a URL parameter as PHOTO_ID/tags?to=USER_ID. To add several tags at once, you can specify a tags property which contains an array of tags like so PHOTO_ID/tags?tags=[{"id":"1234"}, {"id":"12345"}]. Currently, you cannot tag a Page in a photo using this API.
Tagging a photo requires the user_photos and publish_stream permissions, publish_stream is optional - if not present, the tag will go through Tag Review of the tagged person if s/he has this privacy setting enabled. Tagging a photo supports the following parameters.
Hope this resolves the issue