facebook application
Moderator: General Moderators
facebook application
Hello, I want to create a facebook application about music library, here are more details:
Pages on facebook can add this application and set a new artist with his bio and some musics,
I though about how to create this thing and I read about how to create a facebook application at facebook developers documentation, but I'm still confused!!
I want a code that gives me
the user :
id
first name
last name
if he liked the page
if he is an admin
etc ...
the page:
id
name
likes
etc ...
and many other things like conditions if he is not logged in, pop up login window etc ...
can someone teach me how to do this ??
Thank you a lot, you can contact me at amirbawab[at]hotmail[dot]com
Pages on facebook can add this application and set a new artist with his bio and some musics,
I though about how to create this thing and I read about how to create a facebook application at facebook developers documentation, but I'm still confused!!
I want a code that gives me
the user :
id
first name
last name
if he liked the page
if he is an admin
etc ...
the page:
id
name
likes
etc ...
and many other things like conditions if he is not logged in, pop up login window etc ...
can someone teach me how to do this ??
Thank you a lot, you can contact me at amirbawab[at]hotmail[dot]com
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: facebook application
Google is a good starting point; a quick search for 'creating my first facebook app' will yield sufficient (and helpful) results
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: facebook application
I have search lot on google, may you please suggest me a website, and if you have any idea please tell me ... thank you
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: facebook application
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: facebook application
i opened more than 10 sites from here .. it's not clear, and recently the facebook changed the docs and not clear too ...
:/
:/
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: facebook application
The general idea (from what i've experienced) is that the forum will help you if you help yourself. Create some sample code, paste it back here and you'll get more help. Or post in the looking for a developer section so you can pay someone to help with the project (or find a willing soul to help you with it).
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: facebook application
here's a small guide:
1. Create a table `accounts` with `id`(auto-increment), `username`, `password`, `first`, `last`, `permissions`, etc... - This will be your user information
3. Create another table `$username` with `id`(auto-increment), `page`, `like` - This will be your "likes" database for each user
4. Create another table `pages` with `id`(auto-increment), `name`, `content`, `likes`, etc... - This will be your page database
5. Create a register script and encrypt at least the password
6. Create yourself an account with that scipt (tests the functionality and gives your script a chance to be used before release)
7. Manually edit your permission level to admin
8. Create a login script ($_SESSION and $_COOKIE come in helpful here)
9. Login with the script
10. Create a "create a page" script
11. Create a "like" button
The last bit should be easy providing you did steps one and two correctly
1. Create a table `accounts` with `id`(auto-increment), `username`, `password`, `first`, `last`, `permissions`, etc... - This will be your user information
3. Create another table `$username` with `id`(auto-increment), `page`, `like` - This will be your "likes" database for each user
4. Create another table `pages` with `id`(auto-increment), `name`, `content`, `likes`, etc... - This will be your page database
5. Create a register script and encrypt at least the password
6. Create yourself an account with that scipt (tests the functionality and gives your script a chance to be used before release)
7. Manually edit your permission level to admin
8. Create a login script ($_SESSION and $_COOKIE come in helpful here)
9. Login with the script
10. Create a "create a page" script
11. Create a "like" button
The last bit should be easy providing you did steps one and two correctly
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: facebook application
I haven't had a lot of experience with this but the more complicated part of the scripts are related to the login and passing along of the session token once the user is logged in
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: facebook application
not if your session_start() is in a shared header 
oh, and the login is a lot easier than the registration. With login, all you have to sanitize and compare is a username and password. With registration... Well, there's quite a bit that can go wrong.
If you need an example, I have xampp installed on my computer and a DNS registered, so go here: http://www.gametack.org
I'm still working on the site, so that's just a start
oh, and the login is a lot easier than the registration. With login, all you have to sanitize and compare is a username and password. With registration... Well, there's quite a bit that can go wrong.
If you need an example, I have xampp installed on my computer and a DNS registered, so go here: http://www.gametack.org
I'm still working on the site, so that's just a start
Re: facebook application
social_experiment thank you but i prefer to learn it my self .. the question is how ? I read a lot !!
egg82 thank you, I know how to create this in php, it is very easy but the problem is how to connect with facebook,
I want to create an application that admins can add it to there pages, so I want to store in my database :
Who is the admin of the page?, so the admin page is displayed when he visit the application
Who is not the admin of the page? so the content (bio, playlist, photo album etc ..) are displayed
The page unique id to make the application work on many pages without confusing artists pages
[pageid] => [artist name]
example:
[5] => [bob marley] (url=www.facebook.com/pages/5)
[45123] => [shakira] (url=www.facebook.com/pages/45123)
hope you understand what i want =)
PS: i read a lot on facebook docs and other sites(google) but no results...
thank you
egg82 thank you, I know how to create this in php, it is very easy but the problem is how to connect with facebook,
I want to create an application that admins can add it to there pages, so I want to store in my database :
Who is the admin of the page?, so the admin page is displayed when he visit the application
Who is not the admin of the page? so the content (bio, playlist, photo album etc ..) are displayed
The page unique id to make the application work on many pages without confusing artists pages
[pageid] => [artist name]
example:
[5] => [bob marley] (url=www.facebook.com/pages/5)
[45123] => [shakira] (url=www.facebook.com/pages/45123)
hope you understand what i want =)
PS: i read a lot on facebook docs and other sites(google) but no results...
thank you
Re: facebook application
ahhhhh I get it now...
To be honest, i've never written anything for or including Facebook, so I can't be much help. Sorry!
To be honest, i've never written anything for or including Facebook, so I can't be much help. Sorry!
Re: facebook application
it's ok, if u ever knew anything about it plz let me know, thank you
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: facebook application
Yeah that's what i am trying to assist you withamirbwb wrote:social_experiment thank you but i prefer to learn it my self .. the question is how ? I read a lot !!
egg82 wrote:not if your session_start() is in a shared header
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: facebook application
actually, happy to publicly announce it, in case someone else stumbles upon this post:
header.php
login:
any other page:
(Code from my site - All names have been changed for obvious reasons)
header.php
Code: Select all
<?php
//get session
session_start();
if(!isset($_SESSION["init"])){
session_regenerate_id(true);
$_SESSION["init"] = true;
echo('<form action="getyourcookies.php" method="post" id="redir">');
?>
</form>
<script language="JavaScript" type="text/javascript">
<!--
document.getElementById('redir').submit();
//-->
</script>
<?
}
Code: Select all
require("header.php");
$_SESSION["username"] = $row["username"];
echo('<form action="./" method="post" id="redir">');
?>
</form>
<script language="JavaScript" type="text/javascript">
<!--
document.getElementById('redir').submit();
//-->
</script>
Code: Select all
require("header.php");
echo($_SESSION["username"]);