× Joomla Facebook Connect support forum

Topic-icon HOW DO I TRIGGER AN OPENGRAPH ACTION?

Active Subscriptions:

None
11 years 11 months ago #23240 by fb_546164587
Hey Alex,

Thank you very much for such detailed post!

I have set up my code according to your specifications and now I don't get any errors. However, I can't see any actions posted to Facebook. Should I see them in my Wall or I need to get Facebook approval in order to do this?

Thank you in advance and keep up the good work! :)

Tadas
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #23241 by gerbro
Hi Alex,

Awesome! As it happens, since I was wanting to trigger a graph call when users play a/v content in my JW Player, JS really was the best route for me as I could instantiate all of the graph calls through a custom JS plugin for the player.

Now that I'm working on the UI for my users to be able to look at their recent actions and publish them retrospectively, I will definitely be putting this very useful code into practice!

Many thanks,

Gez
The topic has been locked.
Support Specialist
11 years 11 months ago #23253 by alzander
Tadas,
If your profile has been upgraded to Timeline view, you can go to that page and then click the "Activity Log" button in the top right (under the Cover Photo). That should show any actions that have been added to your timeline.

If that's not working, try enabling the "Display API Errors On Front-End:" in the Configuration -> Facebook API tab of JFBConnect. Then, when you try to publish the action, you may see an error popup that will help diagnose any problems.

Hope that helps!
Alex
The topic has been locked.
Support Specialist
11 years 11 months ago #23254 by alzander
Gez,
Glad you're going as well and you found a good solution for your needs!

As always, please let us know any feedback or suggestions you have on Open Graph actions or anything else with JFBConnect you'd like to see implemented or improved!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #23276 by fb_546164587
Thanks Alex, yes I have Timeline and was looking for actions at the right place.

Turning on errors was helpful as it gives me this:
Facebook API Error: (#200) Requires extended permission: publish_actions

1. I have added the publish_actions permission request in Facebook API Tab > Additional Permissions Request.
2. Deleted user from the User Map
3. Deleted App from my Apps list on Facebook
4. Logged in again, but the pop-up did not ask to approve Publish_actions permission and continues to give the same error.

Any ideas would be appreciated. Thanks!
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #23304 by Ivan
Hi Guys,

In the developers section of facebook. I created some actions however when i hit the submit button i get this error:

3 Review Submission
Publish Actions
You must publish at least one action to your Timeline using this action type. Review the documentation.


Before I had used to code in this article and was having my achivements published in the app ticker.
developers.facebook.com/blog/post/539/

Does anyone know if this code has been deprecated now that we have open graph actions?

I dont see this code working anymore and nothing is being feed to ticker. I know they have stated that this was changed.

In my object types i have Game Achievement and i have the correct tags on my achievements page:

DO i have to use this new method to publish an action to the timeline.

I have tested publishing using Action type earn connected to object type Game Achievement, and I do have on the actual achivements page which i once used to register using the method on the link i provided above. Do you know if this code is still working?

Im not sure how to verify if the old method or even if this new method is working. Do you think there might be a conflight with the default game.achievements since i created this custom object type?

  if($fbUserId)
            {  
            
            $jfbcLibrary = JFBConnectFacebookLibrary::getInstance(); 

            $args = array(); 
            $args['game.achievement'] = 'http://mysite.com/achievements/achievement/'.$this->achUser->ach->id; 
            $jfbcLibrary->api('me/my_app:earn', $args);  

            }
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #23306 by Ivan
Hi I edit the post above.
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #23405 by Ivan
Can anyone assist?
The topic has been locked.
Support Specialist
11 years 11 months ago #23439 by alzander
Sorry for the delayed response. Open Graph (as mentioned a few times) still isn't an area of expertise for us, so some things do take some research. It's also not a developed feature, so it gets lower priority for now. Anyways... :)

Tadas,
You've found a bug! Currently, our jfbc.login.login_custom() function is not properly requesting extended permissions. You can easily fix this by editing the /components/com_jfbconnect/includes/jfbconnect.js file. Around line 26 you'll see the following code:
scope:jfbc.scope
Update that to:
scope:jfbc.login.scope
That should properly request all of the permissions on login.

Ivan,
As far as I know, the code you used above from that post is still correct. There are certain actions that are 'core' functionality for Facebook, like scores in Games. Other custom actions just for your app should operate the same way. That message that you get when you try to publish an action is definitely confusing. We think it means that you basically need to test the action before you publish it. So:
* You create the action and noun objects in the Open Graph area of your Application
* You then implement it on your site somewhere and publish it to your Timeline. You can check your history in your Activity Log on your profile
* Once it's there, then you can submit it to Facebook for approval.

I think Facebook just wants to make sure you plan to use the custom actions, since they have to manually approve everything. By making you post it to your own timeline first, it helps them verify your intent. I'm not sure if you can only post to an Admin's timeline while an action is unpublished, but that sounds reasonable.

Hope that all helps!
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #23442 by fb_546164587
Hi Alex,

I have changed the code as you instructed, however, permissions are still not requested.

P.S. I have cleaned the user from the user map and deleted the app in my account settings before testing.

You can try it yourself at demo.eventhread.com

By the way, I started getting this error after updating to version 4.2.2:
This e-mail is already registered. If you forgot your password, click on the Forgot your password link and a new password will be sent to you.

Automatically Link Facebook Users by Email setting is set to Yes.
The topic has been locked.