Facebook OpenGraph - issues with Activity Plugin - facebook

I've been able to post activities to my personal wall and timeline, but I don't seem to be able to get the Activity Plugin to go no matter how I call it. I get a success when I call it, and have also been getting a success code from the command line CURL calls.
<script type="text/javascript">
function postAttend()
{
FB.api('/me/kaplangraph:attend' +
'?class=http://samples.ogp.me/253928254644843','post',
function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post was successful! Action ID: ' + response.id);
}
});
}
</script>
This I know is working. I see them on my personal timeline. I can't however pull them up in the Activity Plugin. All of the following show up blank. Am I missing something?
<fb:activity action="kaplangraph:attend"></fb:activity>
<fb:activity actions="kaplangraph:attend"></fb:activity>
<fb:activity actions="kaplangraph:attend" app_id=253477038023298></fb:activity>
<fb:activity app_id=253477038023298></fb:activity>
<fb:activity site_url="https://severe-winter-5145.herokuapp.com/"></fb:activity>
Thanks guys, I also posted to the FB developer group ... hoping to get an answer there.
I will post if I find anything, but I agree this is a bug and not a beta issue. It says in the example that this will work for devs/admins/etc ... just not the world. I am guessing somehow in the transition they killed the activity feed, as I am having trouble with others as well.

The Facebook timeline and new open graph are still in beta. I'm pretty sure it won't show up in the activity plugin until it is out of beta.

I think this is a bug; Yes, they are in beta, but the tutorial makes no mention of the fb:activity not working. It is also unclear what parameters should be passed (action or actions). I too have tried various ways of trying to get fb:activity to work, but for now I am waiting to see if there is any update to address this issue.

Related

Facebook event subscriber: FB.event does not appear to work on Ipdas

FB.Event.subscribe('egde.create', function(response) {
alert('can you see me on an ipad??');
});
Has anyone else had trouble getting code like this to work on ipads? I am trying to react to a Facebook 'like' event. And this exact code works everywhere except on Ipads.
Does anyone know a workaround for this?

Facebook Opengraph action publishing error

I'm trying to create a read button for my application. I have implemented the code as per the tutorial, but when i click publish button it says Error Occurred
<script type="text/javascript">
function postArticle()
{
FB.api(
'/me/svolzesocial:news.reads?article=<?php the_permalink() ?>',
'post',
function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Successful! Action ID: ' + response.id);
}
});
}
</script>
I also tried debugging, but its showing no error there.
I have created publish button on this page Svolze post Please help me out to sort this problem!
You're posting to the wrong URL.
If you're using the build in read action you should post to
/me/news.reads
If you're using a custom action you should post to
/me/yournamespace:youractionname
At the moment, you're convoluting the two.
Nikhil,
Please also console.log(response) when there is an error to help debug. My guess is that you don't have the correct permissions - you will need publish_actions to publish on the user's behalf. Add a login button with the correct scope and then try to publish.
Some resources:
Perms page
Graph API Explorer

Facebook oauth callback and Opera

I have created a facebook app which, after clicking a submit button, asks the user for permissions. If the permissions are given, the user is redirected. This works fine in every browser I tested, except for Opera. Opera just doesn't seem to enter the callback function:
$("#perms").click(function(){
FB.ui( { method: 'oauth' } ,
function(response){
alert('test');
if (response != false) {
res = eval('(' + response.session + ')')
}
}
);
});
In Opera, I am asked for permissions, but the alert never happens. Am I doing something wrong? Is there a different (newer) way to ask for permissions that works with Opera? I googled this problem but found only one page with a sort of similar problem. Adding the channel.html didn't solve the problem though.
Thanks in advance
Still see this issue on Opera 11.52.
browser.js enabled and updated to the latest version.
channelURL set as described in FB docs.
But! it works if I use gistfile.js (beautified version of all.js) located on my host
Do you have browser.js enabled? We have workarounds against some problems with Facebook's Connect script. Note that the workarounds will only trigger if you run Facebook's script from the "official" location on Facebook's server.
For background, please see my response on FB.login callback not working on Opera Mobile browser

I am having significant trouble getting items to post a read News items in the time line

I can't seem to get a post to work for our news items as FB News items. I was able to create a whole custom type and I discovered the News specific option after I had implemented a standard object:action setup successfully so conceptually this should work since we had all the pieces working before.
Originally we (GlobalPost) created out own app and Auth for our own name space gp_storyshare for our article object with a action read.
Then I ran over this
https://developers.facebook.com/docs/opengraph/news/
and sighed, since it wasn't linked to any of the other documentation and started over. Here is where I'm at.
Since then I have added in all the news specific OG tags and altered our og type to
without any name space
see good example page with tags here
http://www.globalpost.com/dispatch/news/regions/asia-pacific/111206/burma-myanmar-aung-san-suu-kyi
I have not done anything to our App, not sure if I need to make any auth changes or anything as the developer page says nothing and the object isn't mine to control. ** I have a feeling this is the issue but no real proof.**
on window.load I call newsRead() seen below, like I did before. This doesn't work.
function newsRead()
{
FB.api('/me/news:reads' +
'?article=http://www.globalpost.com/$node->path','post',
function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post was successful! Action ID: ' + response.id);
}
});
I just have no idea what to try next. Any help is appreciated.
For any of the open graph actions (including built-in) you'll need the publish_actions permission, but it's still in beta at the moment and will only work for registered developers and testers of the app - I'm not aware of any other specific restrictions, but I think you're probably going to be posting 'Article' objects ( https://developers.facebook.com/docs/beta/opengraph/objects/builtin/ )

FB.event.subscribe('comment.create') doesn't work

I am trying to get a notification when an user comments using the social plugin. The code is as following:
<fb:comments href='someurl' width='400'></fb:comments>
FB.Event.subscribe('comment.create', function(response)
{
alert(response);
}
Simple, but it's not working. Someone got some possible errors? From my research online, it seems as if the notification has no real consistency. Sometimes it works, sometimes it doesn't.
Add the notify="true" attribute to the fb:comments tag.
<fb:comments notify="true" href='someurl' width='400'></fb:comments>
FB.Event.subscribe('comment.create', function(response)
{
alert(response);
}
why not to close the function call?
FB.Event.subscribe('comment.create', function(response)
{
alert(response);
});
I was having the same issues until I stumbled upon this answer here:
Methods subscribed via FB.Event.subscribe to comment.create or comment.remove are not triggered
You should put everything related to FB.[...] functions (FB.init,
FB.Event.suscribe, ...) in
window.fbAsyncInit = function(){
// Your code });
Otherwise your code will be parsed before the FB js sdk has been fully loaded and you will >never really suscribe to
your event
That might be obvious to a lot of people but for me and others who are new to this that might trip you up.