I created a test app that doesn't do anything yet. Then I created an action to write to fb profile and trigger it when content is viewed by an authenticated user. On the action page I placed some HTML in the Profile Box FBML and in the Main Profile Box. In the facebook I added the app to my profile and I can see my custom HTML in the Boxes tab, but when I move it into the Wall tab, I get my block with the following message:

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

Any ideas why is that happening?

Comments

Dave Cohen’s picture

The action provides one way to write to the profile. Another way would be to use PHP and the facebook client api. If you're using the action, you have to not only define the action but also trigger it. This might be done through a cron job or when a user account is created or when the user adds content, etc.

Sometimes its tricky to really be sure an action is triggered when you think it might. So for debugging and testing you might want to make a node, using the PHP input filter, with a body something like:


This page will call profile_setFBML()...
<!--break-->
<?php
global $fb, $fb_app;

if ($fb) {
  $fb->api_client->profile_setFBML("this was set by a test page!");
  print("<p>profile_setFBML returned.</p>");
}

?>

Then view that node, on a canvas page so $fb will be set. Then check your profile box.

If you come up with better ways, by all means let me know.

gemini’s picture

Dave,

the line "profile_setFBML returned" is being output, but I don't see this "this was set by a test page!" anywhere.
I needed to turn off my action. Ok, the test appears in the Boxes tab, but in the narrow sidebar it's still the same message - No content to display....

gemini’s picture

Changed your API line of code to this type

$fb->api_client->profile_setFBML(null, $fb->user, null, null, null, $content);

and it worked.

Letharion’s picture

Status: Active » Closed (won't fix)

Since Drupal 5 is no longer supported, I'm taking the liberty to close all FB D5 support requests.