boban984
  •  boban984
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2011-04-26T10:07:40Z
Hi
i would like to know if YAF has an option or plugin that i can use to send the messages
from the posts of the forum to Facebook.
Something like this
http://wordpress.org/extend/plugins/wordbook/ 

Maybe point me to how this can be done (im a asp.net programer).
(Maybe you could suggest another forum app that has this ability).

example. Send this message that i am writing to facebook.

thank you for your time
Sponsor
tha_watcha
2011-04-26T15:08:10Z
Quote:

i would like to know if YAF has an option or plugin that i can use to send the messages



Currently there is no option, there is only a similar option to post it to a blog via the meta api. For Facebook it could been done with the facebook graph api.

All we need is a facebook app api key that is stored in the settings, and a Facebook user name stored in the user profile.

I Just added facebook and Twitter to the user profile. I add the post to facebook function in the next few days
UserPostedImage
boban984
  •  boban984
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2011-04-27T12:54:41Z
-- Posting your Topics/Post to Facebook --

(This is the simplest way of getting the token , without using any code , since you'll need to do it once i dont see why you'd bother with code)

First, you need to get an access token that your windows service or app can permanently use. You can get this by visiting the following url (all on one line), replacing [ApiKey] with your applications Facebook API key.
Quote:


http://www.facebook.com/login.php?api_key= [ApiKey]&connect_display=popup&v=1.0
&next=http://www.facebook.com/connect/login_success.html&cancel_url=http://www.facebook.com/connect/login_failure.html
&fbconnect=true&return_session=true&req_perms=publish_stream,offline_access,manage_pages&return_session=1
&sdk=joey&session_version=3



In the parameters of the URL you get redirected to, this will give you an access key. Note however, that this only gives you an access key to post to your own profile page. Next, you need to get a separate access key to post to the specific page you want to access. To do this, go to

Quote:

https://graph.facebook.com/[YourUserId]/accounts?access_token=[AccessTokenFromAbove]



YourUserID - the id of the page

You can find your user id in the URL when you click on your profile image. On this page, you will then see a list of page IDs and corresponding access tokens for each facebook page. Using the appropriate pair,you can then use code like this:


After you have the access token for offline posting

open postmessage.ascx.cd
Go to method - protected long PostReplyHandleNewPost(out long topicId)

add the following
var app = new Facebook.FacebookApp("The access token u got with the steps above");
var parameters = new Dictionary<string, object>()
{
{ "message", "Message from :"+this.User != null ? null : this.From.Text },
{ "name" , "Name...." },
{ "description" , this._forumEditor.Text},
{ "picture", "url for image" },
{ "caption" , this.TopicSubjectTextBox.Text.Trim() },
{ "link" , "http://www.someadress.com" },
{ "type" , "link" },
};
app.Post("PAGEID" + "/feed", parameters);



(idea from - source :http://www.jamescrowley.co.uk/category/coding/c/)


--
This will post the title / content of the topic to your facebook page
archi
  •  archi
  • 50.6% (Neutral)
  • YAF Camper
2012-08-09T10:25:59Z
Hi

I'm a little confused about the functionality of facebook integration. I have been developing a site with a YAF forum (older version 1.9.5...) in asp.net 3.5 that is nearly ready for release. I have now decided I would like some slick facebook integration (both for login/registration and posting to User's facebook page). I have two questions ...

1. Does the facebook integration that is part of YAF 1.9.6 include easy ability to post to users facebook stream/timeline? (or is it purely for the login functionality).

2. If not, is it still the easiest way / a vital starting point to integrate the Graph API, or is that an entirely new piece of work that I might as well do on my current version, and not need to upgrade to 1.9.6 / asp.net 4.0? I'm slightly reluctant to upgrade my site to asp.net 4.0 as it could be a lot of work plus my current host doesn't support above 3.5.

Any advice?

Thanks.
tha_watcha
2012-08-09T12:04:11Z
Originally Posted by: archi 

Hi

I'm a little confused about the functionality of facebook integration. I have been developing a site with a YAF forum (older version 1.9.5...) in asp.net 3.5 that is nearly ready for release. I have now decided I would like some slick facebook integration (both for login/registration and posting to User's facebook page). I have two questions ...

1. Does the facebook integration that is part of YAF 1.9.6 include easy ability to post to users facebook stream/timeline? (or is it purely for the login functionality).

2. If not, is it still the easiest way / a vital starting point to integrate the Graph API, or is that an entirely new piece of work that I might as well do on my current version, and not need to upgrade to 1.9.6 / asp.net 4.0? I'm slightly reluctant to upgrade my site to asp.net 4.0 as it could be a lot of work plus my current host doesn't support above 3.5.

Any advice?

Thanks.



Yes you can share an topic via facebook using the graph api


UserPostedImage
archi
  •  archi
  • 50.6% (Neutral)
  • YAF Camper
2012-08-09T13:51:24Z
Originally Posted by: tha_watcha 

Originally Posted by: archi 

Hi

I'm a little confused about the functionality of facebook integration. I have been developing a site with a YAF forum (older version 1.9.5...) in asp.net 3.5 that is nearly ready for release. I have now decided I would like some slick facebook integration (both for login/registration and posting to User's facebook page). I have two questions ...

1. Does the facebook integration that is part of YAF 1.9.6 include easy ability to post to users facebook stream/timeline? (or is it purely for the login functionality).

2. If not, is it still the easiest way / a vital starting point to integrate the Graph API, or is that an entirely new piece of work that I might as well do on my current version, and not need to upgrade to 1.9.6 / asp.net 4.0? I'm slightly reluctant to upgrade my site to asp.net 4.0 as it could be a lot of work plus my current host doesn't support above 3.5.

Any advice?

Thanks.



Yes you can share an topic via facebook using the graph api



... but only if I upgrade to 1.9.6?
tha_watcha
2012-08-09T20:23:14Z
Correct you Need the latest Version.
UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved