Hello,
So, I'm trying to create my first Facebook application with PHP.
Basic ideas for my application:
My website includes feature called “tip of the week" and i would like to create a code that automatically sends this “tip" to my facebook page as well (as status update). I tried use crontab in my webserver for sending the data, but ran into problems...
PHP code that i tried is simple:
Code: $api_key = '***';
$secret = '***';
require('/facebook-platform/php/facebook.php');
$facebook = new Facebook($api_key, $secret);
$user = $facebook->require_login();
$output = “my status";
$result = $facebook->api_client->users_setStatus($output);
This works just fine when it's used with browser. But the require_login() part gives trouble when code is used with crontab (no login cookie/information).
So is there a way to send data to my application without login, or is there some other way to create status updates? Can I send the login information with the require_login() (for example)?
How to generate a text file using php...?
Hi, Can anyone give me code to generate a text file using phpThanks in advance
javascript in php code causes page to display white
Hi All,Odd one this, I've got the following code (below) which is a simple log in form. The client wanted a pop to inform you when you've not completed a field and an asterix to appear.This is fine.
text box alphanumeric caracters only
hi all! I have search on google on how to enter in a test box only caracters A-Z,a-z,0-9 using php, but all the solutions are not for me I need, if you can help me to allow a user to insert only those
Word filter problem
Hello,im trying to make a filter for words inputted in to my website but i want to store the swear word and the replacement for that word in a mysql db i have developed the code
List/Menu Box
On an edit page when you want something to select what a user has previously selected from the database, how would you do this for a List/Menu box? The only way I know how is Code: <?php echo
Syntax Help
Code: im having trouble with that code snippedParse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to do everything I want except for this. I want the script to only show 5 at a time (which i have
Delete all files in folder except with certain name
I have a script that I want to delete all files in a folder (taken from a database) except for one named thumb1.jpgI have this, but this deletes all the files and a subfolder if there is one. How can
Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing a textarea for example will strip them out (I think). How do I retain the \n's or whatnot and place
Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes user id as parameter and gets the info from database and stores it in the session variable. I did