How to retrieve Facebook user profile unique url/id - mysql

I am planning to have a competition as a first promo for my page.
I will be using PHP for scripting.
I will uploading the scripts to a web hosting server and call the page url on FB.
On FB, I will creating unique woobox app. I will call this page on that app.
What I need on is, when the participant is given the page he/she can participate, the programe should first check if this user has already participated or not in the competition.
If he has already participated, he should be directed to a page where it will say, u have already participated.
If not he/she should be directed to the page he will give his Name, Country & email.
On this page too, I prefer to make use of Facebook api to get the Name, Country, & email id instead of asking participants type in these info..and also get the user profile id and save in the db base, do avoid duplicate enteries
I am totally blank about this FB api n graphs...
Need you fullest help on this.. pls...

The registration plugin can grab a users info and allow them to register, the plugin will post that registration info to which ever page "database" you need.
refer to: http://developers.facebook.com/docs/plugins/registration/

Related

User specific information upon loin

I am looking to make a website whereby a user will be able to login and register. Once registered and logged in I would like for them to see a list of their own customers and carry out some functionally configured to the user (e.g send an SMS from their registered phone number).
I have seen plenty of tutorials on how to implement both login and register functionality. But I have no idea how to make the information shown be specific to each customer?
Can someone assist by pointing me in the right direction for something like this? Or even a template that may already have it done?
So fair I have been able to create a very basic site (localhost) that has a user login and registration form.
Sending SMS from website is done with paid services, you can search some of them.
User specific website is done for example by using PHP. For example you have form for registration and then save the data into a database. Next time the user comes, you offer him login form, if he logs in succesfuly, you now know who the user is and offer some content according to the user. For example (simplified) you will have a folder named "Peter" and in this folder you will have informations about Peters customers. And if Peter logs in, you offer him data from this folder.

Laravel Check the User Share Telegram Bot Link to other Users

Hi i want to develop the bot , but first i ask users to share the link of my bot to 5 other users then continue and register in my bot , i develop all sections but i cannot handle the first one, how can i detect that the use send share link to other user ?
i user laravel + talageram bot SDK to develop my bot.
i just want to know that user share the link and continue , i search in many docs and site bud i cannot find anythings that useful to me.
please help me to handle this problem in my telegram bot . thanks :)
Basically, you can't find out if your user has sent the link to others. You can only find out when the other user taps on the link and starts your bot. This can be done by Deep Linking. You should create a unique identifier for each user and add it as a query string to the special link made for the user.
Example:
https://telegram.me/my_bot?invitedFrom=user1
You have to check for invitedFrom parameter each time a user starts your bot in order to credit the referrer user.
By using above method, you will only be notified when the other user starts your bot.
However there is a trick you can do in order to see if a special message is forwarded to other users. Here are the steps:
Make a private channel.
Create a message containing your bot link.
Forward the message to your bot user.
Ask your bot user to forward the message to friends.
Check the view count of the message to know if it's seen by others.
By using this trick you can find out how many times the message containing your bot link is seen.

Create Website with Facebook API to collect invited User ID's

I am looking to integrate Facebook into my website. The website is basically an online meeting and the user has to know the host's username to log in. I was wondering if there is a way withing the Facebook API to invite specific users and link them to this meeting object, I was thinking by pulling the invited users User ID and inputting it into a database, so that when the guest goes to the party they just have to log into Facebook and it will bring them to the correct party (by MySQL search matching their user ID with a meeting). I hope I explained this correctly, but is there a way to do this with the API, or even a better way to complete this?

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.

Add application to Fb Page from outside Fb, add tab for it and configure if with specific data?

I have a simple product catalogue for businesses. There is a catalogue's management interface for adding products. Each business has a unique domain name where all its products are listed.
I would like to extend catagloue's functionality and allow businesses to have their products listed on facebook.
Functionality of the facebook application:
- Each business can install application from catalogue's management interface (I would like to have a button that opens facebook in a new window and prompts user to authorize access to one of user's existing Facebook Pages)
- installing application adds a Tab on selected Facebook Page,
- by clicking on a Tab visitor of the Facebook Page is presented with a list of products specific for this business. Data for that page is dynamic and can be accessed with a REST call and presented as json or html.
We would like each business that have a product catalogue with us to install application and have it automatically configured to use specific domain name when requesting product data.
Is it all technically possible? Could you point me into the right direction on how to
- install application from external website
- configure that application with a parameter (perhaps passed in url when requesting application installation)
- automatically add Page Tab for this application
Cheers,
Michal
Yes it is possible. But it'll be a little different from what you are thinking, i guess.
I recently implemented code to add a tab to a page programmatically, it is as follows(in PHP) :
$tabAdded=$facebook->api("/".$id."/tabs","post", array("access_token" => $access,
"app_id" => $fbconfig['appid']));
From the code we see that we need an app id, an access token, and the page id($id). $facebook is an instance of the FacebookPHPSDK.
So here's how we can get the three things in question:
First app id, you'll need to create a Facebook page tab app, select Page Tab in the app's Basic settings (where you can mention the page tab url. This url will have the content for a page tab.) You'll also need to enable website because you need to ask the user for necessary permissions (namely manage_pages). For your specific requirement you have to give the domain of the catalogue management app.
Second page id and access token, once you have manage_pages permission you can query the graph api to get the pages of the user using : api('me/accounts') this returns data with page name, page category, page id, page access token for all the user's pages.
#thaddeusmt has already mentioned that you can't create new applications, and need to use the same app, you have to read the signed request and get the page id, and serve content. All that will be left to do is link your customer domains to the correct page ids.
Hope this was useful.
You can install/uninstall (add/remove) application tabs to/from Pages using the Facebook API:
http://developers.facebook.com/docs/reference/api/page/#tabs
You cannot create new applications, however. So you will need to use the same application for each Page.
The way you can show different content for each Page in the Tab (using the same application) is by checking the Signed Request. This contains the ID of the Facebook Page. The code that serves up your application Tab can look at the Page ID and serve up the appropriate content for that Page.
I hope this helps get you on the trail. Good luck!
Yes it is possible.
It's a two way process
First you have to get page_access_token through graphAPI.
www.facebook.com/?fields=access_token
This will return Page_access_token.
Use page access token and use post method
www.facebook.com/yourpageid/tabs/
Post Parameters:
app_id= 'YourAppID'
access_token = 'access_token'
That way you can add your facebook app into facebookPage.