Subscribe

How to create a Facebook application for your youth group news or blog

Topic / Technology

Results of my blog’s Facebook application
Two weeks ago I announced my first Facebook application, a simple RSS reader that streams my latest blog posts to Facebook profiles. It’s actually been quite effective so far. Facebook is sending me a modest amount of traffic and new people are adding the app every day.

Why you should use this for your youth group
I also copied the app and made another one to stream my youth group news, updates and announcements straight to my students’ profiles. There’s several advantages to using a tool like this:

  • My students have direct access to youth group news right within Facebook.
  • All their friends will also see the youth group news, a great outreach tool.
  • Every update title automatically links back to our youth group site for more info.
  • Students can invite their friends to add the application to their profiles, too, thus spreading the news even further.
  • It’s one of the most ideal ways to communicate with students on their turf.
  • The app only shows headlines and a summary of the content so it doesn’t overcrowd profile pages.

Two ways to get this Facebook app for yourself or your ministry
This is such a great communication tool that I want to show you all how you can have one, too. There’s two ways to do this:

1. Let me build and host it for you. I realize a lot of people feel lost when it comes to this kinda stuff, but still could greatly benefit from having the tool. So, I’m willing to create the app for you, host it, maintain it and everything! Just click here to find out more details.

2. Follow my instructions below and create one yourself.

Create one yourself
All the credit for these instructions goes to Falko Timme who wrote up a fantastic tutorial on how to set up a Facebook RSS feed for your blog. If you’re a little geeky and want to know how the app works and understand every step involved, his tutorial is very complete. It’s what I used to create my original Facebook application. My tutorial here is not an attempt to steal Falko’s thunder in any way, but to simplify the process for people who don’t administer their own servers or understand a Linux command line. My package below is also customized to offer some minor improvements to how the application handles RSS feeds.

Let’s get started.
In order for this to work, you must have access to a web host that uses PHP5. If you’re in the market for a good web host, I recommend Buyhttp.com. I use them for my youth group website and their service and support is fantastic. They don’t promise terabytes of space for a few bucks like other hosts because they don’t oversell their servers and they don’t offer cheap service like that. Instead of trying to make as much cash as possible, they focus on offering a high quality service that performs well. They offer hosting plans with PHP5, just make sure you ask for it when you sign up.

You must also have access to your hosting account’s cPanel to set up a cron job at the end of this tutorial.

The following screenshots are obviously from my own Facebook app and are only used as an example. Replace my data with your own.

Step 1
If you haven’t already registered at Facebook.com, you’ll obviously need to do so.

Step 2
Add the Developer Application to your profile, as described here.

Step 3
Once the Developer Application is added to your profile, visit it by clicking on “Developer” in the left side-bar. When the developer page opens, click on “Setup New Application” in the upper right-hand corner of the screen.

Facebook screenshot 1

Step 4
A. Give your application a name. I’ve found that the shorter the name, the better. It’ll fit in your sidebar a lot nicer if it’s short. Unfortunately, mine isn’t. Also check the box under the name field saying you agree to the terms of the Facebook Platform.

B. Enter a valid email address where other developers and Facebook administrators can contact you concerning your application.

C. Enter the path to the folder on your web host that will contain your application files. You’ll get the files a bit later. For now, just make sure the folder exists on your host. IMPORTANT: The URL must end with a trailing slash (/).

D. The canvas page is the Facebook address for your application. This is where people will go to add your application to their profile and view your youth group/blog updates, so make it something easy to remember.

E. Make sure “Use FBLM” is selected.

F. Make sure “Website” is selected.

G. Make sure “Yes” is selected.

H. You can do this at a later time if you want. Just upload a 16×16 icon for your app that will display in the left side-bar for your application.

I. Fill in whatever you have from step D above.

J. Enter a brief description of your Facebook application.

K. This is the default text that will display on people’s profiles if something goes wrong with the application.

L. Make sure “Wide” is selected.

M. Again, enter your canvas page URL from step D above.

N. Click “Save.”

Facebook screenshot 2

Step 5
Now you’ll see your API Key and your Secret for your application. Copy these down somewhere. You’ll need them later.

Facebook screenshot 3

Step 6
Download this package and unzip it somewhere on your computer:

Zip archiveRSS Facebook Application Files

Step 7
Open the following files with a text editor, like Notepad for Windows or Taco HTML Edit for Mac. Do NOT use a word processor or anything that might format the text. Only replace the text I call for. Leave the apostrophes (‘), quotes (“), slashes (/) semi-colons (;) and commas (,) intact. Also make sure there are no extra spaces before or after the text you replace.

A. Open conf.php

  1. Replace API_KEY_HERE with your API Key.
  2. Replace SECRET_HERE with your Secret.
  3. Replace CALLBACK_URL_HERE with your callback URL from your Developer App settings. (Example, http://www.yourdomain.com/facebook/)
  4. Replace URL_TO_THE_RSS.PHP_FILE with the URL to where the rss.php file is on your host. (Example, http://www.yourdomain.com/facebook/rss.php)
  5. Replace YOUR_SITE_RSS_FEED_ADDRESS_HERE with you actual RSS feed. (Example, http://feeds.feedburner.com/timschmoyer)
  6. (Don’t change INFINITE_SESSION_KEY_HERE yet. We’ll change that later.)
  7. Save and close the file.

B. Open index.php

  1. Find YOUR_CANVAS_PAGE_URL_HERE on line 7 and replace it with your canvas page URL. Again, make sure you do NOT have two slashes in a row (//) before the “invite.php” part.
  2. Save and close the file.

C. Open invite.php

  1. Find YOTHGROUP_NAME on line 12 and replace it with the name of your youth group. (Example, “Power Surge Ministries”)
  2. Find CANVAS_URL_HERE on line 12 and replace it with your canvas URL. Be sure to leave the trailing backslash in place. (Example, “http://apps.facebook.com/timschmoyer”)
  3. Find SHORT_APP_NAME on line 12 and replace it with a short name for your app. About 15 characters or less should be fine.
  4. Find NAME_OF_YOUR_APP on line 13 and replace it with the name of your Facebook application.
  5. Save and close the file.

D. Open rss.php

  1. Find NUMBER_OF_POSTS_TO_SHOW on line 9 and replace it with the number of latest posts you want the app to display. I don’t recommend making this number any higher than 3. (Example, 2)
  2. Find APPLICATION_NAME on line 12 and replace it with the name of your Facebook application.
  3. Save and close the file.

Step 8
Now that all the files are updated and saved, upload the entire package to the callback folder on your web host so they’re accessible from your callback URL. (Example, upload everything to http://www.yourdomain.com/facebook/)

Step 9
With your FTP client, change the permissions of the folder magpie_cache to 777.

Step 10.
In your browser, type in your canvas page URL (http://apps.facebook.com/mygreatapp) and hit enter. You should be taken to a page that looks like this:

Facebook screenshot 4

Click the big blue login button.

Step 11
Your next screen will look like this:

Facebook screenshot 5

Make sure every box is selected and click the big blue add button.

Step 12
You will be redirected to your app’s page where your latest posts are displayed like this:

Facebook screenshot 6

Check your profile page, too. You should see the latest posts displayed there, as well. Congratulations! You’re almost finished. Now all we have to do is set it up to automatically update with new content from your RSS feed.

Step 13
Log out of Facebook and clear out your browser’s cache, cookies, files, everything. This is absolutely necessary for the next step to work properly and to avoid headaches in the future, so do it right the first time. Trust me, I learned the hard way. If you don’t want to clear your browser’s files and cookies, use a different browser instead and make sure everything is cleaned out before going on to the next step. As far as your browser should know, it’s never been to Facebook.com or your website before.

Step 14
With the browser’s cache, cookies, temporary files and history cleared, type the address to the file get_infinite_key.php on your web host. (Example, http://www.yourdomain.com/facebook/get_infinite_key.php)

Step 15
When the Facebook login screen appears, enter your email address and password and make sure you check the box for, “Save my login info to avoid logging in to Facebook again to use this application.” Click the “Login” button to continue.

Facebook screenshot 7

Step 16
A screen will appear that displays your “infinite key.” Copy this.

Facebook screenshot 8

Step 17
Open conf.php, find INFINITE_SESSION_KEY_HERE on line 4 and replace it with your infinite key from step 16. Save the file, close it and upload it to your web host. Make sure it overwrites the existing file.

Step 18
Login to your hosting account’s cPanel and click on “Cron jobs.”

Facebook screenshot 9

Step 19
On the next screen, click Advanced (Unix Style), and configure one of the lines to look like this:

Facebook screenshot 10

In the first box (with “Minute” above it), type */30. In the Hour, Day, Month, Weekday boxes, type only an asterik (*). In the “Command” box, enter the absolute path to the cronjob.php file in your facebook application folder. If you do not know the absolute path to your hosting account, search your host’s knowledgebase or contact support and they’ll be happy to give it to you. (Example, /home/account_name/public_html/facebook/cronjob.php) Then click, “Commit Changes.” The cronjob.php file will now automatically check for new posts and refresh the Facebook app with the latest content every 30 minutes.

Step 20
Your Facebook application is now complete! Play around with it a little. Click the “Invite” tab at the top of your canvas page to invite people to add your application to their profiles. Facebook prevents applications from taxing their system too much by limiting the viral spread of applications. They do this by restricting app invitations to only 20 per person per day. So, you can use the invite tab to sent invites to 20 people today and then tomorrow send invites to 20 more people to join. Or, you can send everyone a link to your canvas page so they can add the app directly. There’s no restriction on how many people can add an application directly from your canvas page.

Step 21
Once you have at least 5 readers, your application is eligible for submission to the searchable Facebook application directory. To do this, click on “Developer” in your left side-bar and the click on the little link, “See My Apps” located in the “My Applications” box on the top right of the screen. Click “Submit Application” and fill out the requested info. In the description, be sure include a couple keywords people might use when searching for your app in the application directory. When finished, click the blue “Save” button and wait a day or two for your app to be reviewed.

That’s it! I hope this is not too overwhelming and trust it will help promote effective communication with the students in your ministry.

Again, if these instructions feel like they’re way over your head, feel free to let me build and host this application for you.

Troubleshooting

  • Make sure you’re using a valid RSS feed. I ran into problems with one app because the feed wasn’t using the normal “Title” and “Description” meta tags. Odd, but apparently possible.
  • If the application isn’t updating your profile page automatically with new content after 30 minutes, manually run your cronjob.php file from a browser (example, http://www.yourdomain.com/facebook/cronjob.php). If you get a bunch of gibberish text, go back and repeat steps 13-17 again. If you get a plain white screen and find that your Facebook app is now updated correctly, re-check your Cron Job settings in your cPanel (steps 18-19).
  • If you get this error: Parse error: syntax error, unexpected '{' in /home/rest_of_path/appinclude.php on line 10 find the solution in this comment below.

Posted on October 18, 2007

  • Pingback: The Over-Educated Youth Pastor()

  • Pingback: The Over-Educated Youth Pastor()

  • Pingback: Planet Webdev()

  • Pingback: Discoveries for Facebook Application()

  • Tim –
    Trying to install/build my own facebook app rss feeder for my youth group’s site, thanks to you!

    I’m getting this error: Parse error: syntax error, unexpected ‘{‘ in /home/wearecrm/public_html/fb_app_01/appinclude.php on line 10

    It happens when I go to my apps page via facebook.

    Any ideas?

    Also – your directions include chmoding magpie_cache to 777, but I don’t have that directory in the zip I downloaded from you… :(

  • Tim –
    Vista doesn’t like your file-structure in your .zip file – i had an xp-user friend unzip the file for me and upload it for me to grab. I have the correct folder-structure now, but am still getting a nasty error –

    apps.facebook.com/crm_news

    any ideas?

    for some reason it doesn’t like the rss.php file – AND you did fail to mention that we need to put a link to our RSS feed in the conf.php file back in step # 7

    -Stevan

  • Tim

    @ Stevan: Vista doesn’t like Mac’s archive packages, huh? That’s lame. Guess I’ll have to zip one up on a Windoze machine instead.

    As for your error, I’m getting a different one when I try to add your app:

    Warning: Invalid argument supplied for foreach() in /www/110mb.com/n/a/v/e/t/s/_/_/navets/htdocs/crm_news_app/index.php on line 20

    There should only 14 lines in the index.php, so I’m assuming you’ve modified it somehow or used an editor that isn’t strictly text. Try reverting back to the original file and just get the app working first.

    As for the error you posted, check to make sure you didn’t accidentally delete a punctuation mark somewhere, like a comma, apostrophe, quote marks or something. If you’re using a text editor, by default it will usually include those marks with the text when you select it to replace it.

    Also make sure you’re running PHP5 on your web host.

    I’m sorry the magpie_cache folder wasn’t in the zip archive. It’s there when I checked it, so it must go back to Vista’s problem with Mac zip files.

    Doh! You’re right, I did leave out the RSS feed part. lol And that’s the whole point to all of this. It’s part of the conf.php file. I’ll update the tutorial.

    Thanks for helping me find the bugs! No matter how many times I went through it and verified everything, I needed someone to go through this with a fresh mind to see the stuff I overlooked.

  • I am getting the same error that Tim received. I have redone everything again and the same message below.

    Parse error: parse error, unexpected ‘{‘ in /home/content/b/r/i/brianandmandy/html/drinkandflowapp/appinclude.php on line 10

    Any suggestions??

  • Tim

    @ Brian and Stevan: I started from scratch to try to figure out why you guys are getting that error and finally solved it. It’s because your web host either does not have PHP5 or it has both PHP4 and PHP5 compiled side by side. By default, your web host will apply PHP4 to files ending with .php and it will apply PHP5 to files ending with .php5, which you obviously don’t have. The best way to fix this is to put a little file in the app folder that tells your server to read .php files with PHP5 instead of with PHP4.

    Create a new text file and name it whatever you want. Open it and enter:

    AddType application/x-httpd-php5 .php

    Make sure it is all on a single line by itself with no empty lines after it. Save and close the file. Rename it to “.htaccess” Notice the period at the beginning of the file name and the remove any file extension after the file name (for example, .txt). Upload that file into the folder with your app and visit your canvas page again. You should be good to go. :) (NOTE: I’m not sure if a free hosts will let you customize their server settings like this. Guess you’ll find out.)

  • SWEET! That works…actually, my host (godaddy) uses a slightly different code:

    AddHandler x-httpd-php5 .php

    Thanks so much for your help!

  • It seems now that Facebook has changed something about the friend invite. I am getting the following error when I use the invite:

    Fatal error: Uncaught exception ‘FacebookRestClientException’ with message ‘Unknown method (this function has been disabled – see http://developers.facebook.com/news.php?story=42)’ in /home/content/b/r/i/brianandmandy/html/drinkandflowapp/facebookapi_php5_restlib.php:390 Stack trace: #0 /home/content/b/r/i/brianandmandy/html/drinkandflowapp/facebookapi_php5_restlib.php(270): FacebookRestClient->call_method(‘facebook.notifi…’, Array) #1 /home/content/b/r/i/brianandmandy/html/drinkandflowapp/invite.php(18): FacebookRestClient->notifications_sendRequest(Array, ‘Drink and Flow …’, ‘

  • Tim

    Aww man, you’re right — they sure did change it.

    I’ll have to figure it out and update the zip package with a new invite file. Thanks for the heads up! I’ll post here when I get it updated.

  • Tim

    Okay, I updated the package files for the new friend invite system and also made it a whole lot nicer.

    If you downloaded the old package, you’ll need to download the new one. It contains updated files you need.

    1. Delete the friendselect.php file from your host. It’s deprecated and is no longer needed.

    2. Overwrite facebook.php and facebookapi_php5_restlib.php on your host with the new ones in this package.

    3. Open invite.php from this package and follow the directions above in step 7.C. Then overwrite the existing file on your host with this new one.

    The invite system is pretty nice, eh? :)

  • Tim,

    This is a fantastic gift to us – I appreciate your willingness to do all of this legwork. I have made it up to step 10 but am getting the following error at http://apps.facebook.com/mikeferber/:

    Runtime errors:
    HTML tag not supported: “base”HTML tag not supported: “title”HTML tag not supported: “body”

    Any thoughts? Thanks!!!

    Mike

  • Tim

    @ Mike: It sounds to me like you used an HTML editor to edit these files and when you saved them, it automatically added the HTML tags to the file instead of saving it as PHP. What program did you use to open, edit and save these files?

  • I used Notebook to edit all of the files. I uploaded them using Dreamweaver. However – I figured it out. the server for ferbefier.com (I use Freeservers) couldn’t handle the PHP. I sent it over to my youth site (on a better host) and it worked! Thanks for helping me think it through… on to step 11!

  • Tim

    Excellent! Glad you got it figured out. It really is important that people use solid web hosts that can support this first. That alone will save you a lot of headaches, and not just with this app.

  • Pingback: Facebook Feed Problem - HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials()

  • Great tutorial. Were you at HighEdWebDev?

  • Tim

    Thanks, Brad. No, I wasn’t at HighEdWebDev. Sorry.

  • Oh, ok. I just followed a sample from http://www.allegheny.edu/hewd to do this and it was very similar!

  • Mike

    When I do step 10, I get this

    ??

  • Mike

    I mean this:

    ">??"

  • Pingback: StumbleUpon » Your page is now on StumbleUpon!()

  • Kim

    I use godaddy so used the ‘AddHandler x-httpd-php5 .php’ in the .htaccess and I am still getting the error appinclude.php on line 10 – any suggestions?

  • Kim

    Never mind, I looked on GoDaddy support – needed to use this…

    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4

  • try this in the .htaccess

    AddType application/x-httpd-php5 .php

  • I’ve followed your steps, and I got it to work successfully, however, my facebook app doesn’t show the blog contents, it only shows the title of each blog entry, but no contents. Do you have any ideas on how to fix this?

  • Hey whats up! Thanks for all this info, im going to try to do this. But i had a question, if i want to make my application do something, have some action on it, such as graffiti wall or other similar application, how can i do that?
    Thanks!
    Have a great and a GOD blessed day!

  • Pingback: Facebook Platform Developer Forum / using Magpie RSS to create facebook app()

  • Does this use the updated friend invitation scheme?

  • Sure does, Amyloo. I updated it to use the new invite system a while ago.

  • Hey Tim. Thanks for this info by the way…!

    For some reason, the "description" is not showing up… just the title of the posts. I've checked my feeds… and everything is functioning. For some reason it's lost when it filters from my feed to the actual app. Any thoughts?

    My feed: http://feeds.feedburner.com/groundlevelupdates/

    My app: http://apps.facebook.com/groundlevel/

  • Never mind.

    I fixed it.

    Thanks again for this info…

  • Glad you fixed it, Chris. Do you mind sharing the solution in case someone else runs into the same problem?

  • I’m a bit embarrassed to say what it was… ;)

    Turns out I was using an ATOM feed… not an RSS feed… there’s obviously a difference. That was the issue. I changed FeedBurner to convert the feed… and now it works great!

  • Pingback: Simple Facebook App : Ministry Design()

  • Matt

    I am having a really frustrating problem. Everything is working EXCEPT for the auto-updating, which is one of the most important bits! I am not sure how to fix this. I have followed all of the instructions, and I am using PHP 5 but it just won’t work. I tried going directly to the cronjob page before I applied the cronjob to do it automatically, but it didn’t even update the block then.

    Any suggestions?

  • Matt, what happens if you run conjob.php in your browser? For example: http://www.yourdomain.com/facebookapp/cronjob.php

  • Matt

    I just get a blank white page, and no update occurs on the users profile…

  • Matt

    Any idea what the problem is? I am trying to get this fixed asap for my users…. Thanks in advance!

  • Mike

    I have run into a problem with UTF encoding. Namely that apostrophe’s in my posts get parsed as question marks. This is down to the magpie script, but I have not been able to find a way around this. Has anyone else come accross this and found a solution?

  • Kirsten

    Ever since the new Facebook code change your profile canvas page doesn’t work.

    I was told to use this new FB code:

    $facebook->api_client->profile_setFBML(”, 12800193, ‘profile FBML here’, ‘profile action fbml here’, ‘mobile fbml here’);

    but I’m not sure what to enter in “profile FBML here”

  • Hey Kirsten.

    The old line of code is:
    $facebook->api_client->profile_setFBML(”, $user);

    Literally cut that line out and replace it EXACTLY as they say on Facebook:
    $facebook->api_client->profile_setFBML(”, 12800193, ‘profile FBML here’, ‘profile action fbml here’, ‘mobile fbml here’);

    It’s odd looking, but it works!

  • Brian Moore

    This may sound like a dumb question, but in what file do we replace the FB code with the new string?

  • Index.php

    I can not remember if that doc was my own creation or if it was a part of the zipped package from Tim.

  • Kirsten

    Thanks a lot for the help and the quick reply! I’ll try it out as soon as my exams are over since I’ve been busy.

    So is that why when I log in I get these errors:
    FBML Error (line 5): illegal tag “base” under “fb:canvas”

    FBML Error (line 6): illegal tag “meta” under “fb:canvas”

    FBML Error (line 7): illegal tag “link” under “fb:canvas”

    FBML Error (line 8): illegal tag “link” under “fb:canvas”

    FBML Error (line 10): illegal tag “body” under “fb:canvas”

  • Ahmed Ali

    Received HTTP error code 405 while loading

    Can’t figure out why?

    Tx

  • Hi Tim,

    Is there any way to add code so that when the RSS feed is updated, it puts a message in the subscriber’s newsfeed or minifeed?

    Thanks,
    Jeff

  • Barry

    Tim, I find his very interesting as my church is currently researching different methods of engaging our youth. However, several members of my youth committee have questions with respect to the safety of youth who participate on social networking sites as we have heard stories of predators lurking online, and have asked if there are any policy suggestions that might be relevant.

    Thoughts?

  • @ Barry: I highly recommend that you guys read a book called, “Totally Wired: What Teens and Tweens Are Really Doing Online” by Anastasia Goodstein. You may also want to want the video archive of my parent seminar on teens and the Internet. Also of value is the video archive of the Internet Caucus Advisory Board to Congress where a panel of experts helped Congress understand what teens are doing online.

    The short answer to your question about social networking sites being unsafe and full of predators, though, is that it’s all totally false. These are extremely rare stories that the media jumps on and exaggerates because hype sells and creating fear generates more viewers. Every legitimate study out there shows that the exact opposite is true, so go with the facts, not the hype.

  • when i first tried everythign worked perfectly, but now it is saying that page not found on faceboook, when people try to view http://apps.facebook.com/hotlismfeed/
    but i when i log in i can view ( not found if i log out and try).
    any idea of how ??

  • I followed your implementation procedure but as soon as I hit step 10 http://apps.facebook.com/myreaderrss/ I get following error

    “Error while loading page from My Reader
    There are still a few kinks Facebook and the makers of My Reader are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged – if it persists, please come back in a few days. Thanks!

    I am hosting my app in godaddy. I read on different blogs there are some callback timeout issue with godday. Not sure if that’s why I am getting this error.

    Any help will be much appreciated.

  • I am getting this error message when going to http://apps.facebook.com/%5Bmyfacebookapp%5D :

    Errors while loading page from application

    Received HTTP error code 404 while loading http://www.mydomain.co.uk/fb/feedread/http://www.mydomain.co.uk:88/fb/feedread/

    There are still a few kinks Facebook and the makers of [my app name] are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged – if it persists, please come back in a few days. Thanks!

    A similar problem also prevents me from getting an infinite access key.

    Any help suggestions would be greatly appreciated!

  • im getting the same as john thompson. Ive been up all night doing facebook application tutorials and none of them work.

    first i was gettting Parse error: parse error, unexpected ‘{’ messages
    in canvas area, now that ive changed the htaccess.txt to .htaccess i just get an error 404 message. I dont understand it. I hope there is something can be done
    i think my hosting company does do php 4 & 5 together

  • Its ok its working now.
    Face book couldnt find the files because i uploaded the RSS_facebook_app Folder to my webhost and did’nt mention the actual folder when i wrote the path to the index.php. I took the files out of the folder uploaded them again and it worked fine. Beginners mistake but if it helps another beginner Ive done my bit.

  • Matt

    Tim…. any update on my problem? I really can’t figure out why it isn’t updating the pages.

  • I honestly haven’t done any troubleshooting. Facebook seems to update and change their FBML so often that it’s hard to keep the app updated. Honestly, troubleshooting other’s problems it’s not very high on my priority list. The app still works (I know, because I still use it for several different apps), but I unfortunately can’t diagnose everyone’s issues. I know that probably sounds snotty, but hopefully you’ll all understand. I recommend posting your issues on the forums at HowToForge.com, where this app originated and seeing if anyone there can help.

  • Jeremy

    Hey, do you also provide this service for Church of Satan youth groups?

  • Hello Tim,
    thanks for the nice article actually i’ve done it all and i got a brilliant result, but with one problem that the cron job file isn’t working and the content isn’t changing..
    any ideas why?
    Thanks in advanced.

  • ALTERNATE OPTION
    for fixing php issue on GoDaddy or other such PHP 4/5 Linux host:

    If you rename your application’s php files from “.php” to “.php5” and then edit the “require” lines in index and so on to reflect the new extension, it’ll work like a charm. I had to do this because my blog was using .php and using a .htaccess file messed everything up.

  • Pingback: How to create a Facebook application for your youth group news or blog - PlugRug.com()

  • Pingback: Lista de recursos para desarrollar aplicaciones para Facebook « Think Free - Linux.Php.Java.ME.Movies()

  • Pingback: Lista de recursos para desarrollar aplicaciones para Facebook » Sentido Web()

  • Yvette

    Hello. I was so excited and grateful to find this site, so first of all, thank you!

    My facebook application worked perfectly until this morning when I noticed this error. Can anybody tell me what this means? I didn’t change a thing to the code so I don’t know why this would happen out of nowhere.

    Warning: array_slice() [function.array-slice]: The first argument should be an array in /hermes/bosweb/web123/b1232/sl.xxxx/public_html/fb/rss.php on line 20

    Warning: Invalid argument supplied for foreach() in /hermes/bosweb/web123/b1232/sl.xxxx/public_html/fb/rss.php on line 21

  • @ Yvette: Sounds like your RSS feed is down or something.

  • Pingback: openFactoryBlog = openFactory.create(); //: Lista de recursos para desarrollar aplicaciones para Facebook()

  • Mark

    Hey,

    What can I do if I cant get my webserver to accept php5? I can only run php 4. Do you have any suggestions for me?
    Please, any help will be appreciated!

  • @ Mark: You’ll have to check with your webhost to see if they’ll compile PHP5 for you or not. If you’re on a shared host, chances are they won’t, but it’s it can’t hurt to ask.

  • Sam

    hi, first and foremost I would like to thank you for making the process of setting up an application so simple. It is exactly what I was after and works perfectly…..almost!

    Evertyhing is working fine and when I click on the application link in my mini-feed bit of my profile, it takes me to the application home page bit and shows my feeds. Perfect…

    …however, when I scroll through my profile and find the profile box that has been placed there for my application, it says:

    “No content to display.

    This box will not be visible to people who view your profile until this application adds content to it.”

    which unfortunately is a little bit of a problem because that is the feature that I was really kind of hoping to work!!

    Any ideas?

    Here is a link to my app:

    http://apps.facebook.com/westhamprocess/

    many thanks for your time,

    God Bless you all, Sam

  • Sam

    just like to quickly say that I solved the problem with a little bit of rooting around in the changes I made to the code…

    ….thanks all the same!!

  • Tim

    Hi,

    Has anyone figured out how to utilize the news feeds / notifications with this application? It would be INFINITELY more useful if there was that viral quality to it…

  • Hi,

    About 404 Issue; use ip address instead of domain name. I discovered that facebook has some problems during resolving domain names. If dns resolve fails, facebook return 404 error.

  • Evan Wagstaff

    I like the format of this guide a lot, it really helps out those with no knowledge of php coding or the developer platform (i.e. me). However, without fail, I’ve only gotten to a 404.

    Received HTTP error code 404 while loading http://www.dailynexusupdate.com/facebook/?_fb_fromhash=930126710d2312c707e15a79fd98a717

    There are still a few kinks Facebook and the makers of The Daily Nexus are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged – if it persists, please come back in a few days. Thanks!

    Apparently that’s the text that everyone dreads. I’ve gone back and redone all the steps 3 times with no success. How can I make it to the add application page?

    Could there be an error on the FTP loading side? Its the only part not explictly covered in the guide. I used FileZilla and loaded all the files into a /facebook directory but still not luck.

    Thanks,
    -Evan

  • Evan Wagstaff

    I got past the 404 issue, now I’m stuck with 2 error prompts on my app page instead of my actual feed:

    Warning: array_slice() expects parameter 1 to be array, null given in /home/ewagstaf/public_html/facebook/rss.php on line 20

    Warning: Invalid argument supplied for foreach() in /home/ewagstaf/public_html/facebook/rss.php on line 21

    I did not edit these lines. What could be wrong?

  • Yvette

    My app was working perfectly (thanks to this tutorial!) but then I noticed that it wasn’t refreshing on the profile view. It only worked if I clicked on the canvas page first so I looked into my cronjob and got this error. But what is really strange is that it was working before and I didn’t touch anything, did Facebook change something and how can I fix this? Thanks!

    -bash-3.00$ /usr/bin/php /xxxx/xxxx/cronjob.php

    PHP Notice: Undefined index: facebook_config in /xxxx/xxxx/facebookapi_php5_restlib.php on line 54

    PHP Notice: Undefined index: facebook_config in /xxxx/xxxx/facebookapi_php5_restlib.php on line 1300

    -bash-3.00$

  • Thanks for the great tutorial….I’m getting this error when I first fire up my canvas page however:

    “No data stored for fb:ref url:’.$rss_url.’. Use fbml.refreshRefUrl to refresh this data.”

    Sounds like its looking for the URL to my rss.php file and not finding it? I definitely set it in the conf file….suggestions?

  • Evan

    Maybe there’s a way to adapt this RSS feed to the “add to wall” capability in the new facebook?

  • Hi, I had an app that was working brilliantly, until the redesign!

    I am now getting the same error as Evan Wagstaffe, if anyone has any ideas as to how to get around this error, it would be greatly appreciated!

    (Evan if you have found a solution, feel free to email me, whu9105[at]yahoo[dot]co[dot]uk)

    On a traffic generating note, this application is phenomenal…since mine has not been working, my traffic has gone down from about 1000 a day to about 300 a day. Gutted!

    Sam

  • this information is amazingly helpful and am highly thankful to the author.
    Regards,

  • Dan

    Hi Tim.

    I really like this. However, I’ve got one problem with it – while the content displays fine in the boxes area of the profile (wide), it doesn’t work for having a profile box on the main (wall) page of the users profile.

    Everything shows up OK in the wide (boxes) area, but I get a message “No content to display…this box will not be visible on your profile until this application adds content to it” in the narrow box. It’s a shame, because I think if it worked fine on both the wide and narrow bits, it would be a fantastic piece of code.

    Is there anything I can do to fix this?

    God bless,
    Dan

  • @ Dan: Yeah, I’m having this issue now, too. Currently working on the issue. It’s a result of the “new” Facebook. This app was originally written for the “old” Facebook, before the new layout and features were added.

  • Dan

    Hi Tim.

    I’m glad it’s not just some mistake I made – can’t wait for the fix :)

    By the way, I’m really enjoying reading your blog. I only found the site a few weeks ago, but it’s really encouraging and useful! I’m actually only 17, and not a youth leader (yet!) but I go along to a youth group and we’re hoping to start a new one which is more Christ-focused (the other is more like a youth club, with some Christianity mixed in).

    Anyway thanks for everything. I look forward to seeing a fix sometime soon.

    Yours in Him,
    Dan

  • xavier

    Hey I hope anyone can help me, my web page is in spanish, the tutorial was great and myy feeds are functioning perfectly, but in the feeds titles I dont now why the “accent marks”, the description everything is ok but not in titles, can somebody help me???

  • Desiree

    I tried to make one but it was to hard
    I want it to be called Pinewoods Youth
    Thanks

  • KC

    Afraid I’ve got the same problem as Dan (above). Has anyone found a fix for it?

    Thanks for the excellent tutorial by the way.

  • KC

    Hello again!

    Tim I think this might provide the information you’re looking for but I’m afraid I’m not technical enough to be able to figure it out for myself:

    http://www.rioleo.org/facebook-profile-box-showing-no-content.php

  • Pingback: facebook app - java : tutorial links | Gyani . info()

  • im getting the error ‘FBML Error (line 4): illegal tag “body” under “fb:tab-position” ‘

    I edited the pages using notepad

    any ideas?

  • ben

    hey excellent tutorial, working great for me!

    got a bit confused as facebook has changed its developer pages about but i got there in the end!

    now i have a bit of a problem i want magpie to parse my podcast enclosures too, ive tried swapping the rss_parse.inc file with the hacked one available to make it display enclosures but im coning up short. probably cos im not that great with php.

    im wondering have you tried doing this or can you give me any help with this?

    many thanks ben

  • Thanks for sharing this information with us. I am looking for same kinda tutorial from many days.

  • UCBoomerang

    Hello! Could you please tell me why I have this error on http://www.apps.facebook.com/ucboomerang ?

    Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Failed when fetching the data from http://www.facebook.ucboomerang.com/rss/php. Error: The requested URL returned error: 404' in /home/ucboom5/public_html/facebook/facebookapi_php5_restlib.php:1316 Stack trace: #0 /home/ucboom5/public_html/facebook/facebookapi_php5_restlib.php(386): FacebookRestClient->call_method('facebook.fbml.r…', Array) #1 /home/ucboom5/public_html/facebook/index.php(13): FacebookRestClient->fbml_refreshRefUrl('http://www.face…') #2 {main} thrown in /home/ucboom5/public_html/facebook/facebookapi_php5_restlib.php on line 1316

  • Mr Rodell

    I don't understand what is the issue … I followed all of your advise, using Godaddy, chnage my feed to RSS (instead of Atom) and it can go as far as step 10. After I logged in … same message all the time: –

    Errors while loading page from application
    Runtime errors:
    URLExceptionEmpty URLs not allowed here
    fb:iframe: Empty URLs not allowed here
    Please try again later. We appreciate your patience as the developers of Pretty Women Pageantry and Facebook resolve this issue. Thanks!

    Any help?

  • Tyler

    I am getting this error:

    Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Unknown method' in /home4/twitter/facebookapi_php5_restlib.php:1316 Stack trace: #0 /home4/twitter/facebookapi_php5_restlib.php(374): FacebookRestClient->call_method('facebook.profil…', Array) #1 /home4/twitter/index.php(12): FacebookRestClient->profile_setFBML('<fb:ref url="ht…', '100000223812995') #2 {main} thrown in /home4/twitter/facebookapi_php5_restlib.php on line 1316

    I am assuming this is because of the infinite key no longer be an option and/ or the new invite code. have you got any suggestions?

  • Pingback: Rename Htaccess.txt To .htaccess In Cpanel | Cloud Server Trial()

New eBookGo
Focused Youth Ministry ebook

85% off!

Focused Youth Ministry

This practical "how to" ebook will walk you through a 30-step process to discovering God's vision for your unique ministry context. The process also shows you how to implement that vision and put metrics in place to evaluate what is moving the vision forward and what isn't.

Price: $12.95 Limited time: $1.99

footer