MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Any way to connect my blog with facebook ?   (Mono Support )

53045 put(a) pogledan, 5 odgovor(a) 22.1.2013. 20:25:59Kreirao(la) super
super

super

22.1.2013. 20:25:59
Any way to connect my blog with facebook ? so that whatever is being posted on the blog posted automatically on facebook too ?
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
imarusic

imarusic

23.1.2013. 9:31:46
Hi,

currently that is not automatically implemented, but you can use MonoX share provider to achieve functionlity you need.

Regards.
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava
super

super

23.1.2013. 16:48:42
I know about sharing but that is not feasible for each n every post since it is very time consuming. It would be great if this feature is added in monox.
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
mzilic

mzilic

23.1.2013. 17:21:36
Hello super,

The following feature is not supported directly by MonoX and requires custom coding. We have developed similar features for custom projects however.

First please make sure that you are following these guidelines to create a custom MonoX based project.

Next you need to select an SDK you would like to use for your Facebook integration, we have used Facebook C# SDK.  One of my coworkers wrote an article on this subject and you can read it here. The article will demonstrate you how to setup your own Facebook application and how to fetch users profile. This is a sample code which can be used to post a message on a users wall, please note that the sample is based on Facebook C# SDK:
            /// <summary>
        /// Posts a message to wall.
        /// </summary>
        /// <param name="accessToken">User access token.</param>
        /// <param name="title">Message title.</param>
        /// <param name="description">Message description.</param>
        /// <param name="link">Message link.</param>
        /// <param name="imageUrl">Custom image url.</param>
        /// <returns></returns>       
          public bool PostMessageToWall(string accessToken, string title, string description, string link, string imageUrl)
        {
            Facebook.Web.FacebookWebClient client = new Facebook.Web.FacebookWebClient(accessToken); // facebook user access token see here for more info http://developers.facebook.com/docs/reference/api/
            Dictionary<string, object> args = new Dictionary<string, object>();        
            args["from"] = ApplicationSettings.FacebookApplicationId; // this would be your own application id which you obtain from facebook
            args["description"] = description;
            args["name"] = title;
            args["link"] = link;
            args["picture"] = imageUrl;
            var obj = client.Post("/me/feed", args);
            JsonObject post = obj as JsonObject;
            if (post != null)
            {
                if (post.ContainsKey("id") && post["id"] != null)
                {
                    string id = post["id"].ToString();
                    if (!string.IsNullOrWhiteSpace(id))
                        return true;
                }
            }
            return false;
        }
Now that we have covered the Facebook integration, here is a related blog post.This article demonstrates the steps required to push blog posts to Blogger. The MonoX implementation section will be of an interest to you since it explains the steps needed to push any blog post to an external service.

Regards,
Mario
Ocjena 5,00, 1 glas(ova). 
2218 Reputacija 300 Ukupno objava
super

super

23.1.2013. 17:41:01
thank you mario for the code - I deeply appreciate it
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava