Web Forms :: Post Html Code In Facebook Fan Page Wall
Oct 15, 2010
I am creating Fan page and application for Post something in Fan page wall from ASp.net page. But Text get post Nicely. But Images and attachments not get post in my wall. Is ther any way to Pass HTML code from asp.net to post in my Facebook Fans page Wall.
I'm using an ASP.NET Facebook Developers Toolkit (http://www.codeplex.com/FacebookToolkit) on an external website, and I'm also the admin of a facebook fan page for the website. Users on my website (may or may not be facebook users) create content articles.
I would like to hook up these articles to the Facebook fan page, so that, when they write the article, then ones with FB accounts can sign into FB and post on the Fan page. I'm sure they would need to be a fan first.
I want Post to Wall Post functionality in facebook fan page application. I am developing it using ASP.Net. I am using javascript sdk and applying strem.publish method. Below is th code which i have used.
i have an app to post on friends wall but i want it to prompt to choose from friends like adding friends by checkbox so that the messsage can be sent to all i selected simultaneously.
I'm using the TokenExchange_Url URL to receive the unique user OAuth token to make calls with.
This is working fine, because a) i receive the token back, and b) i can issue HTTP Get Requests to the Graph API (i.e UserDetails_Url) and it works fine.
But, i cannot Post to the User's wall using the Feed_Url.I'm pretty sure the issue is i haven't got the appropriate user permissions to post to a wall (i.e facebook-side setting).
Now, i realise i can use the fbPublish API method client-side to do this, but i want to do it server-side with the Graph API.
I wont bother showing my code which attempts the call to the Graph API to post to the user's wall, as its pretty straightforward (HttpWebRequest, set method to "POST', set content type/length, write bytes to Stream, etc).
I think the problem is i need the user to grant my aplpication "publish_stream" extended permissions.
The Facebook Graph API doco says to do this in your authorization request:
Am i using the wrong Token Exchange URL? Why is there two different URL's to seemingly get the same piece of information?
Yes - i have read the Facebook API doco (numerous times), and yes i have read other similar SO questions, but they all result in using the client-side API to publish to wall, i want to do it server side.
For the actual "Facebook Connect" button, i'm using the standard FBML:
When i click this (and not logged into Facebook), it pops up a window which the user can login. But it doesnt have the "Request Extended Permissions" dialog - shouldnt it? Or is that another popup i need to manually trigger?
So to sum up, here are my questions:
How do i grant extended permissions to publish to the user's wall?What is the correct URL for obtaining an OAuth token?Is there a definitive source for showing how to post to a user's wall using server-side Graph API calls?
I can able to post now FB comment post from asp.net system but if i want to schedule some message from my sytem what can i do ? How can i store FB account ?
i want to post an image or photo into users facebook wall without using Fileupload control.i have retrieved an Image from my database in .bmp format and i want to post that bmp image into facebook wall. i don't want to use Fileupload controls.
I have to create facebook style wall in my project. So far I assume that I will get X(the number that needs to be shown be default) number of wall posts from database, bind them to some control like Repeater and add update panel in each row in repeater so that only the portion of page only related to that post is updated once any new comment is added in that post.
Now, since I am new to AJAX so cant figure out how to display the "older post" link functionality there. As we have link at the bottom of facebook wall which once clicked appends the certain number of older posts at the end of the wall.
Similarly, once a new post is added by someone, it gets added at the top of the wall, how can I acheive that so tha only the limited portion at the top of the wall gets refersed and updated instead of whole page post back.
i have managed to develop a status wall some what similar to facebook, using Repeater Controls- Parent Repeater is bound to the status and the child repeater is bound to the comments inside that status. I am strugling to implement the following solution- hiding and displaying a btnDeleteComments - depending of the owner of the comment- i.e. only owner of the wall and those who leave the comment can only delete that comment.
Status X Comment A - left by member John Comment B - Left by Member Doe Comment C - Left by Member Harry
The owner of the wall can delete all comments, and only John can delete comment A, Doe can delete comment B and so on Here is what i have tried so far
1. fill a data set with two tables and relate them (table one = status, Table 2 = comments of that status) 2. data bind the repeater to this data set 3. here is the HTML of the child repeater
The higlighted bit is causing the cast invalid error- i thought this would do the trick, by deafult all the delete buttons next to each comment is hidden for members other then the owner of the wall- and only if they are the one who left the comment will teh delete button be visible-
The SQL which retreives the comments for a specific status, also retrieves a column2 ViewersComment which is either 'true' of 'false', indicating wether that comment was left by this person viewing the status wall-
I like to send messages when I want from my aspx webpage. I used the different examples and used FaceBook API 3.1. I am getting error as "service temporarily unavailable". I have assigned AppKey, Secret Key and session key. My sample code is below.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Facebook; using Facebook.Web; using Facebook.Rest; using Facebook.Session; using Facebook.Utility; using Facebook.BindingHelper; using Facebook.Schema; using Facebook.Web.FbmlControls; using Facebook.Session.DesktopPopup; namespace FaceBookApp { public partial class _Default : System.Web.UI.Page { private const string ApplicationKey = "MY_APP_KEY"; private const string SecretKey = "MY_SECRET_KEY"; private Api fbAPI; private ConnectSession _connectSession; // private List<EventUser> _eventUsers; protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { _connectSession = new ConnectSession(ApplicationKey, SecretKey); _connectSession.SessionKey = "MY_SESSION_KEY"; if (!_connectSession.IsConnected()) { // Not authenticated, proceed as usual. //lblStatus.Text = "Please sign-in with Facebook."; } else { // Authenticated, create API instance fbAPI = new Api(_connectSession); string response = fbAPI.Stream.Publish("publish steven on facebook."); } } } }
The error message is confusing. It must be a very simple solution. I don't know what I am missing. Here is the facebook exception.
I am using Facebook Toolkit. I have appKey and appSecret, but I dont want that visitor need to conenct to facebook. I will use my login/passwork to get my wall posts.
I am making a db schema for facebook like wall structure. I need to save wall posts, share a link, share a video stuff into my database. Till now I am able to make this schema : GO CREATE TABLE [Wall] ( [ID] [int] NOT NULL IDENTITY(1, 1) , [PostText] [nvarchar](MAX) [PostedByUserID] [int] NULL , [PostedOnUserID] [int] NULL , [DateCreated] [datetime] NULL ) GO
Next I have to add the schema for adding the "share a link" and "share a video" feature.
1st case: When the wall post is inserted the [SharedLink], [SharedLinkTitle],[SharedLinkDesc], [SharedLinkImageSrc] columns will be inserted as null and rest of the columns will have the values.
2nd case: When the "link shared" is inserted the "[WallText]" column will be inserted as null and rest of the columns will have the values.
For my case 70% of the time the wall post will be made and 30 % "links" will be shared which means 70 % of the cases [SharedLink], [SharedLinkTitle],[SharedLinkDesc], [SharedLinkImageSrc] will be inserted as null. Now my concern is that is it okay to keep the null columns inserted or I should go for a separate table for "shared a link" purpose and have the separated table like this: