Facebook photo name showing on website - mysql

How can I get the user's photo and name to show on my website and save them in MySQL?

This can be simply achieved by querying Graph API with id of user
http://graph.facebook.com/USER_ID?fields=name,picture
Results will contain name of the user and URL to his picture

you need to get permission from user that uses your application.
once you have user_photos permision you can do whatever you want.
you can find all permission in here: extended permission: https://developers.facebook.com/docs/authentication/permissions/#extended_perms
and look out here:
https://developers.facebook.com/docs/reference/api/photo/

Juicy is right that you can get that information. Turgut is not right about the authorisation as you can actually get that information for anyone if you know their Facebook Id. And therein lies the issue. If you are in a facebook app then facebook will post the user's id with the request for each page within the request object. But outside of facebook iframe apps you will need a way to query the users id. this can be done using the Facebook javascript api.
Here is some further reading:
http://developers.facebook.com/docs/reference/api/
http://developers.facebook.com/tools/explorer/?method=GET&path=735915914
http://developers.facebook.com/docs/authentication/canvas/
visiting users Facebook ID w/out authorization?

Related

How to access my own news feed and videos, photos I share?

I'm just making a simple widget where I can display my facebook feed as customized, like grid view.
When I was submitting for app review, there was so much permission when it was my own feed only. I have no plans for visitors to like login into my site. It's just my own feed on my site on grid view.
Are there other simple ways to do this rather than graph API? Simply to get my facebook feed as JSON.
If it is just for your own account, you do not need review. Review is only neccessary if you want to enable other users to use your App - or, for example, if you want to get data of Pages you do not own.
Just use a User Token with the correct permissions to get your account data with the Graph API.

Instagram: Is it possible to get user's name, follower numbers, and search photos with #tag?

I once asked this question.
Is it possible to use Instagram API in order to make a user list according to the number of followers?
And I am not a programmer, just a salesman.
And it seems like we cannot make this influencer finding tool by using "official" Instagram API. So I have looked for other solutions and found a way to get data from Instagram by using other API and JSON.
Please refer to these links.
https://github.com/whizzzkid/instagram-reverse-proxy
How can I get a user's media from Instagram without authenticating as a user?
Obtaining Instagram Access Token
My goal is creating an influencer finding tool, so I need to find photos with #tag and make user list accordingly to the number of followers of the user.
My question is;
1 Is it possible to get data such as user name, follower numbers, photos with certain #tag? by using non-official API and JSON?
2 And suppose we made it, then Instagram will find out our products and ban our accounts or service? It seems they do not allow us to use non-official API.
I would appreciate it if you could teach me whether we can make it or not, in a way that you talk to the person who does not know much about JSON or so.
Thank you!
Using unofficial API is always risky, its against their terms and policy.
You can use official APIs to make get this info.
You first have to make hashtag API , which gives you posts with username (no follower count), then for each user, you have make another API call to get user info, this will give you follower counts, bio and other details.
The 2 APIs needed are below, you need public_content scope permission and have to get your app approved by instagram and go to live mode.
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN

Posting messages to facebook users using their facebook ID

I have created a page with a facebook login option for users with facebook account on my website.
When they login I store their basic information like thier id, name, and email.
Now I want to send messages/ post on their wall using the IDs I have stored of the facebook users in the database.
Is their any FB tool available or how can I do this using FB javascript to acheive the same?
You can use Post from the GraphAPI to post to their timeline https://developers.facebook.com/docs/reference/api/post/
For obvious reasons of not turning Facebook into a source of spam, you cannot programatically send messages to users.

How to get user photo using LightOpenID php class for google and yahoo

I am using LightOpenID php class ie openid.php class. I want to fetch the user photo. But it does not return information about user's photo. Please help me I have to fetch user account photo.
Thanks,
OpenID providers don't have to return any information you've requested.
Here's the list of attributes Google will return if you ask for them:
country
email
first name
language
last name
You can find it at google's openid endpoint documentation.
Google won't return any other attributes, regardless of whether you ask for them or not. Since the user photo isn't on the list, you can't get it.
As for yahoo, a post on developer.yahoo.com says that if you request media/image/default it will return the profile picture. I don't know whether that information is up to date though. If you still can't get the profile picture by requesting that, then most likely yahoo doesn't support it anymore (or you don't have a profile picture).

Get all information of a facebook page

I would like to recover the non-public information to a facebook page for an application "desktop" in C # and I do not know how. Do I have to go through a Facebook application that the user allow or do I get the Facebook user to have a access_token and display the page based on this one? FYI I use graph (and a JSON) that I get, I picked up this version as the "public" group:
https://graph.facebook.com/283774678311430
Do I have to go through a Facebook application that the user allow
Yes, you need an application to let the user give access to view the page or have the page owner give access
do I get the Facebook user to have a access_token and display the page based on this one?
Same answer, use the page owner as the user call /me/accounts and grab the page access token.