can any one give the demo
how to implement facebook like box( single sign - on) and twitter's tweets for a web application using .net(c#)
You can read this article about how to implement facebook login in a .net web application. If you want to display tweets on your page, you basically just add some javascript to your page. See the twitter API wiki for more info.
Adding the Facebook like box to your page is really easy, you can check out the Facebook Developers Reference, there's even a 'Get Code' button to get the necessary code.
All you need to do is add a script reference and a <fb:like> tag, all the options are in the above link.
Related
I am trying to embed Facebook comment box in a windows 8 store app. Is it possible to directly integrate the comment box or are there any other alternative solutions?
What I am trying now >>>> create a web page and add the Facebook comment box to webpage. Then access the webpage that I created through a Webview control. But when I try to login to Facebook using the comment box's link, it will not open the login dialogue inside the webview but it opens the browser where my windows 8 Store app pulled to the background.
I would recommend that you use the Facebook API, as recommended by another SO user answering a similar question
There is a Facebook API for Windows 8
You can find an example on Github here
I haven't tried this API, but did a WPF app using a similar API and it's usually straight forward.
If you would like to, and I know you didn't ask about that - this is just a tip, there is a web authentication broker in the WinRT API's to enable single sign on (SSO) connections to OAuth providers like Facebook etc.
You can find a sample here
Hope this helps, best of luck.
First of all, sorry for my newbie question...
I am google-ing for something like that for days, but still no luck.
I can't find any examples for using the Facebook C# SDK
with Facebook Page Tab applications.
Unfortunately most examples are for Facebook Canvas applications
and I can't make them work with a Page Tab application.
I really need to see a working example of the following:
Get whether the User Liked my page, or not.
If the User Liked my page, show an "authorize" link/button.
On clicking the "authorize" link/button, ask for User's permission to:
access his info, post to his wall, etc.
(using facebook's usual dialogs for that)
After the User accepts, redirect him to the "member's only" page.
(...inside the tab application frame. not a canvas-type frame)
Whenever an "authorized" User comes back to my tab app,
he should be automaticaly redirected to the same "member's only" page.
(I suppose if I have an example for the previous steps,
I won't have a problem figuring this out)
Building app for canvas is the same as making it for Page tab. The only difference is the so called "fangate" (liker/non-likers).
This can be used out of the box only on page tabs and the only thing you need is to decode the signed request passed by facebook.
There is good explanation for doing this with C# here:
Decode Signed Request Without Authentication
I was wondering, is there a way I can create an application which for example updates both my facebook and my twitter at the same time?
So for example I have a GUI which has a similar interface as my facebook profile (or whatever), and I want to post a comment on my profile through my GUI, so I write a line in a GUI textbox, press apply and it adds the post to my facebook profile and at the same time to my twitter for example.
I know this sounds silly since u can media link both pages, but that's not my true goal, I'm just wondering if this is possible so I can extend it to other facebook services.
See
facebook API
twitter API
And (.NET related) :
C# Facebook API
C# Twitter API(unofficial)
Yes, it is definitely possible. You would have to use the APIs exposed by Facebook and Twitter. You can then post let's say status on both twitter and facebook by calling update status related APIs of both Twitter and Facebook on the apply button click event.
You can use this for Twitter and this for Facebook both are C# clients for Twitter and Facebook respectively.
Yes it is. I don't see how this wouldn't be.
Also, I suggest you have a look at Seesmic Desktop for an application that does that which use Silverlight.
I'm using the Facebook API Graph (C# & ASP.NET) to try to dynamically post to a Facebook page I created.
Looking at the code samples floating around.. they suggest creating a Facebook App first (which I have done)..
However..
I have 3 different pages I want to post to.. Do I need to create an app for each? (I want to post different things to the 3 pages, not the same posts to each)
I just want messages & links to appear as Wall posts. I'm not bothered about having an 'app' that has 'canvas' that is placed in an IFrame.
Question : So do I still need to write one or more Facebook Apps to post to my 3 different Facebook pages??
Where I am so far.. I can pass in my apps credentials and get back the access_token. But my posts don't appear to be going anywhere.
I'd rather drop the 'facebook application /canvas' approach if possible If I can post directly to a wall (For the above reasons).
Oh, and before you ask. I don't want to post to my Apps Wall page, I want to post to my other pages (Unless I have to post to my Apps Wall page first?).
I'm sure loads of people have the same questions..
Thanks in advance.
-- Lee
You can do this with only one app
You'll need these permissions offline_access, publish_stream,
manage_page
After "me" request in response you should parse active_tokens of pages
you administer
Before you make publish request make sure you set
"_facebook.active_token" to
active_token of page where you want
to publish
I think you need to create the Facebook App, because that's the only way you'll get the set of API keys you need for using the API. I think that's the only reason. It's the same when you're using Facebook only for authentication.
1 - I have 3 different pages I want to post to.. Do I need to create an app for each?
No because there is an option to allow an single app to handle multiple pages.
2 - I just want messages & links to appear as Wall posts. I'm not bothered about having an 'app' that has 'canvas' that is placed in an IFrame.
You can do that surely with the help of their Graph API.
You don't necessarily need a canvas, though keep in mind that's where users will go when they click on the name of your app.
Take a look at the Graph API: http://developers.facebook.com/docs/api, particularly the Publishing section. You want to use /PROFILE_ID/feed, where PROFILE_ID is the id of the page you want to post to.
It sure is a pain to prune a Facebook profile. Is there any way using the Facebook API (or some other mechanism) to authenticate as a particular user and remove friends from the user's list? I have looked through the API documentation, but I'm not familiar with the ins and outs of the platform.
I have been through the complete facebook graph api documentation on facebook while i was writing my open source .net sdk for facebook. From all that i understand, i am 99.9 % sure that this cannot be done using their api. You can create status messages, links, photos, albums, events, pages, notes etc using their api ( you need to perform simple post operations for all this ), but i have read no where that a friend can be removed using facebook api !
No API but you can program your browser or mimick a browser. Think of QtWebKit. I doubt if you need to add so many friends and just to remove them using machine.