How to access server Database from Facebook? - php

Can I access My own Database(on my server) using Facebook API's or its just not possible as Facebook wont allow to use Database from other web server.
I want to create an facebook application that will take all the info from friends profile and save it in my database(i.e on my server).
Actually i have not worked on any Facebook application, its just a Doubt!

I want to create an facebook
application that will take all the
info from friends profile and save it
in my database(i.e on my server).
That is possible and you can save into your databse but be aware of facebook privacy policy.

Related

How to get status access token without app review ? If i host on my website still i need to give app review for user status data ?

I am developing an app for educational purpose. Any how i want to get status data of user without submitting app for app review process. If i host an app on my website still do i want to submit it for review process to get status data ?
Should i use facebook4j or something like that api to get around this ?
Currently i am using facebook php sdk and hosting app on my website (Option next to canvas page). I am only getting public profile of user.
Is app review still require when app we host on our website (i.e. not using canvas url) ?
All apps, whether hosted on a private server or not, need to get reviewed for additional permissions. Even if your app is for research purposes, the user_status permission will need to be reviewed before end-users can use it.
Page apps, Canvas apps or Website apps are all hosted on servers, and not on Facebook. So the same rules apply to all three. The review process applies to all.
You should use the official Facebook PHP SDK to develop your app.

Getting all posts related data for a facebook page

For my web application - I need to fetch all the data for a particular facebook page. What kind of permissions do I need. Do I really need to create a canvas app for it?
I dont intend to do anything on FB - but use some of the data available to arrive at some conclusions in my web based application which will be hosted on a server outside of FB.
Facebook's API documents should provide everything you need:
https://developers.facebook.com/docs/graph-api/reference/v2.1/page
According to the permissions section, you'll need either an App token or a User token. Since you're talking server-to-server (I'm assuming this is server-to-server on account of the PHP tag), you're going to want to use an App token:
https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens
You should be able to create a Facebook App from within your Facebook account, which will provide you with an App ID and App Secret. You can use those to make calls directly to the API.

Facebook php api: share facebook app message

I have create a facebook app that interact with an android app, and i have a server where user could register himself (for using app) with his facebook account.
I want that when user register himself for firs time to my server, a link (with app logo and link to app page) will automatically shared on his facebook wall. How can i do?
The best way to do this without spamming:
https://developers.facebook.com/docs/reference/dialogs/feed/
Although i would not just open the dialog immediately after user registration, i would include a button where the user can click to share.
As i commented already: NEVER post anything automatically on the wall of the user, always let the user decide.
That would be for a Website, or a "Web App". If you are talking about a native App, then this may help you: https://developers.facebook.com/docs/android/share

Get Facebook user album=> photos inserted into Mysql db on a website

Can anyone help me with a step by step sample on how to get Get Facebook user album=> photos and inserted into Mysql db on a another website using PHP
like some kind of import this facebook user's albums from facebook script for a website
Thanks
Build a web server that can host your php and mySQL. Make sure you get a valid SSL cert.
Research the Graph API's album to determine what data structure to implement. https://developers.facebook.com/docs/reference/api/album/
Get a facebook app configured. https://developers.facebook.com/apps
Play around with the graph API to understand your queries you will need to write https://developers.facebook.com/tools/explorer
Use the PHP SDK to write your integration with Facebook https://developers.facebook.com/docs/reference/php/

Facebook app - don't request permission to get users data

I've created a simple Facebook app that doesn't need any data/info from users. When I try to view the app on Facebook, it's requesting permission to access my personal info.
I want the app to display without this request, for both logged in and not logged in users.
What's the code to do this?
Edit with more info:
I have a working Facebook app which I want to leave alone, I've duplicated the apps code and created a new app through the Facebook dev area. I've changed the relevant App ID, API ID and Secrets throughout the code. The original app works without any permission needed, but my duplicated version for some reason requests permission.
Simple solution is to create the app in the developers area, do all the settings to an iframe and create the application path to your website. Now in your website remove all the PHP code related to FACEBOOK GRAPH API and let it be a simple website that is independent of facebook. This will make what you want.

Categories