Reputation:
I am new to using Facebook Api and I am using it in visual studio C# , and I downloaded it's library facebook. But I want to know how to start work on it ? Should I use Windows form for it or Console is fine ? Because I just want to Update my status through Api , getting my friend list , read my statuses . As I run this code before but It didn't show me the output
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Facebook;
namespace Social_network_work
{
class Program
{
static void Main(string[] args)
{
var client = new FacebookClient();
dynamic me = client.Get("totten");
}
}
}
as I am python user but now I have to use visual studio c#. "http://csharpsdk.org/"
this link is not showing how to use it in windows 7
Upvotes: 0
Views: 1530
Reputation: 16
To keep the command-line open so you can read the output, add the following after
the Console.Writeline
line
Console.Readline();
Then when you run it, the output will display, and wait for you to press enter - which will allows the program to continue and exit/quit.
Also, in short, yes you should be able to create the app as a complete command-line application without issue.
Upvotes: 0
Reputation: 19733
Your question doesn't have much to do with Windows 7.
You sample works fine. You just don't have any line writting to the console. Try :
var client = new FacebookClient();
var me = client.Get("totten");
Console.WriteLine(me);
Upvotes: 2