Topic-icon Opengraph calls with Javascript

Active Subscriptions:

None
11 years 6 months ago #26909 by jerrws
I apologize if I cannot find this information elsewhere in the forums. We had spoken with a gentleman in the pre-purchase forums about pushing a picture to a facebook user's wall. Our website uses KineticJS to dynamically generate images on the client side. This image is then saved on the server for a short period of time, so we don't have the issues we discussed in those forums. What I want to do at that point is have a button on the client side to publish that image to the user's wall. Thank you for your time.

Regards,
Jeremy Thompson
The topic has been locked.
Support Specialist
11 years 6 months ago #26947 by alzander
Can you give some examples of what would need to be pushed, and how you'd envision that working client side? We don't have any Javascript built-in to push content like I think you're thinking. What I would recommend, as I did in the pre-sales area, is:
* Adding an Open Graph 'tag' to the page that is generated that specifies the image's title, description and URL. Once generated, this information should generally not change as Facebook doesn't like content that isn't static.
* Then, add a Like button to the page the image is displayed on. When a user Like's the page, it will push the title, description and image into their wall.

If that's not what you're looking for, again, give a lot more information and preferably an example, of what you're trying to accomplish. I can't guarantee we can help you implement anything you want, but we'll try to give suggestions and help guide you how we can!

Thanks,
Alex
The topic has been locked.
Support Specialist
11 years 6 months ago #26948 by alzander
Just to get back to this with more info since you seem pretty excited to get going, if you want to create a button that specifically lets the user post to their wall, you can follow the information in the developer guide below:
www.sourcecoast.com/jfbconnect/docs/deve.../facebook-wall-posts

That functionality does a server side post to the user's wall with whatever information you want (title, description, image, etc). The user must have already granted your application the publish_stream permission though, which means they should have already logged in.

Finally, one 'hidden' feature in JFBConnect that hasn't been tested thoroughly yet (and why it's not publicized) is a Javascript call to present a popup for the user to post content to their wall. The user does *not* need to be logged into your site or have granted you any permission beforehand. The call is in the /components/com_jfbconnect/includes/jfbconnect.js file and it's functional definition is:
feedPost:function (title, caption, description, url, picture)
So, you *should* be able to create a button that calls the Javascript, like:
<a href="#" onclick="jfbc.social.feedPost('Jeremy's Page', 'Come look at what I found!', 'This great page features dynamically generated images you might like', 'http://yoursite.com', 'http://yoursite.com/link-to-image.jpg');">Click me to share!</a>
Again, very untested, but may get you started!

Let us know how it goes, and good luck with the options above,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 6 months ago #26949 by jerrws
Thank you very much! The javascript call you defined for me in the second post seems to be exactly what I was looking for. I'll let you know how well that code works as I get it put together.

Regards,
Jeremy Thompson
The topic has been locked.
Support Specialist
11 years 6 months ago #26952 by alzander
Jeremy,
Sounds good! Let us know how it goes and if you need anything else. Again, that code is not tested, promoted, or otherwise known to the outside world, so you're breaking it in!

Good luck,
Alex
The topic has been locked.