mynoicity
New member
- Joined
- Jul 6, 2021
- Messages
- 1
- Programming Experience
- Beginner
Dear all,
My ideal:
1- Use webbrowser with "url a" is ID of fb ID
2- Webpage will be response to "url b"
3 - I get value of "url b" is fb name alias
Simple like that. With a url. It OK
If have a list of url. I dont know how to do.
Please help me for idea
Here is my code:
My ideal:
1- Use webbrowser with "url a" is ID of fb ID
2- Webpage will be response to "url b"
3 - I get value of "url b" is fb name alias
Simple like that. With a url. It OK
If have a list of url. I dont know how to do.
Please help me for idea
Here is my code:
Winforms behind code:
public partial class Form1 : Form
{
public DataTable dt = new DataTable();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
dt.Columns.Add("ID");
var d1 = new DataTable();
d1.Columns.Add("ID");
d1.Rows.Add("https://facebook.com/100035980120039");
d1.Rows.Add("https://facebook.com/100007248495763");
for (int i = 0; i < d1.Rows.Count; i++)
{
webBrowser1.Navigate(d1.Rows[i][0].ToString().ToString());
textBox1.Text = d1.Rows[i][0].ToString().ToString();
}
dataGridView1.DataSource = dt;
}
private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
textBox2.Text = e.Url.ToString();
string s1 = textBox2.Text;
string s2 = s1.Replace("https://facebook.com/", "");
string[] arr = s2.Split('?');
textBox3.Text = arr[0] + "Facebook@facebook.com";
dt.Rows.Add(arr[0] + "Facebook@facebook.com");
}
}