Facebook Posts via 3rd Party Scheduler not visible to people - c#

I am posting on my facebook page using 3rd Party Scheduler but I am guessing the post is not visible to people. I am not getting views on those posts or any interactions.
I am using Facebook C# SDK. Below is the snippet of the code, where 'file' is FacebookMediaStream object.
var fb = new FacebookClient(pageAccessToken);
result = fb.Post(mapping.pageId + "/photos",
new
{
message = 'Demo Title',
file
});
The post does appear on the page feed but I am guessing not on the people's newsfeed since there aren't any views for the posts.
Is there any change in EdgeRank algorithm or some parameter issue while posting it to FB?
Cheers

The same happened to me trying to use php sdk to post on a group feed. The issue was that the application was in development mode. You can check it in the app dashboard near the name of the app (a green circle).

Related

Microsoft.Bot.Builder.Location integrated with Cortana skills: issues selecting the address

I am building Chat bot using Microsoft builder SDK for c#. Currently, I have working location dialog using Microsoft.Bot.Builder.Location with Facebook, emulator and Skype channels.
Recently, I have been trying to integrate bot with Cortana channel however Location Dialog does not seem to work as well as in other channels.
Once I select to “enter shipping” it prompts me for the address. I say the address and it updates the page with found possible locations (as carousel cards) and straight after it updates the page prompting me for selection of the correct address out of the possible found. However, I cannot select the correct option as it already updated the page and I can no longer view possible locations.
This is the way I have implemented location dialog:
var locationDialog = this.dialogFactory.Create<LocationDialog>(
new Dictionary<string, object>()
{
{ "prompt", string.Format(CultureInfo.CurrentCulture, Resources.RootDialog_Delivery_Address_Prompt, (await qtyResult).From.Name ?? "User") },
{ "channelId", context.Activity.ChannelId },
{ "apiKey", "apiKey"},
{ "options",LocationOptions.SkipFinalConfirmation | LocationOptions.SkipFavorites},
});
I am wondering Is there a different approach to get user location (shipping address) for Cortana channel? Thank you!
did this ever get resolved? I am currently integrating the BotBuilder.Location library as well, and all is well on the skype, facebook, etc... side, but concerning Cortana, after it prompts "what location are you interested in?" there is no method for input (microphone doesn't open up and text input is disabled).
I had issues with this dialog as well. What I did was download the dialog and rework it completely to suit my needs (i also replaces bing with google as I could not get the search to work as it does on the bing maps site).
One of the issues is that the card and the message after it are two different messages. Cortana will update the canvas for each post, so I combined it into one.
I had a lot of issues with PromptDialog.Confirm not working so I replaced this with context.MakeMessage and attach the card as an attachment. Then post the message.
In the message, you can have both the card and the text/speech. Then await the response.
The only problem is that you will have to interpret the response. I have yet to figure out how to do this automatically.

Retrieve photos from Facebook/Instagram

I am looking to retrieve photos from Facebook and Instagram for viewing in a WPF application. The idea behind is to show user existing photos and allow them to upload more using C#. A bonus would be to let the user delete photos and set their profile picture, but is not a must.
I cannot find any APIs for either Facebook or Instagram for use in a WPF application, and the ones I did find were all for web (ASP.NET/PHP).
Is there such an API and how might I go about doing this?
Looks like they have what you're looking for in the Graph API:
https://developers.facebook.com/docs/graph-api/reference/user/photos/
Facebook Graph .NET API.
Using the Facebook .NET SDK
Here is an example I whipped up, haven't tested. Should work though. It retrieves the profile picture of a user. Though if you read through the APIs you can adapt it for whatever you need.
var client = new FacebookClient("accessToken");
object taskResult = await client.GetTaskAsync("/me");
var result = (IDictionary<string, object>)taskResult;
var userId = taskResult.Where(s=>s.Key == "id").First().Value
var profilePicUrl = string.Format("https://graph.facebook.com/{0}/picture", userId);
Facebook SDK
For instagram
This link will help you embeding the instagram on a simple html webpage.
There is a button on the bottom of the post on instagram.when you click on the link a menu pops up. then click on embed
now a box pops up
just copy paste the html and you are done.
it will fetch the post for you

What are the ways to post a tweet to twitter with asp.net c#? [duplicate]

With Twitter's new OAuth interface, their API is now many times more complex than what it was. And I haven't even looked at Facebook's API yet.
What I'm wondering if there is a method that employs some higher-level, existing code or interfaces to make this a simpler task.
All I want to be able to do is initiate a Twitter tweet or Facebook share on the user's behalf and be able to control the initial text of those messages, from an ASP.NET application.
I found some similar questions on SO, but they had no answers.
EDIT: I know there are things like AddThis and ShareThis, but I need something that will give me control over the default message. It must contain a link with a code that is specific to the current user.
Twitter Integration...
For making Tweets from an ASP.NET application on users' behalf, check out Twitterizer. It's a free, open-source project for integrating with Twitter from .NET applications.
I agree that using OAuth can be a bit daunting, but the Twitterizer API wraps up most of the complexity. I've written an article on using Twitterizer in an ASP.NET application that you may be interested in: Integrating Twitter Into An ASP.NET Website Using OAuth. After reading the article, download the code sample at the end, which is a working demo showing how to use Twitterizer to post a tweet from an ASP.NET website.
Facebook Integration...
For integrating with Facebook, chcek out the Facebook Developer Toolkit. Like Twitterizer, it's an open-source, free API and should get you going in the right direction.
Happy Programming!
After looking around for a while, I found sharethis.com. They have various share buttons you can add to your site that send Twitter tweets, Facebook shares, etc.
It looks like it also supports options to control the URL, so I could modify this to include whatever URL I need.
I haven't yet figured out if I can control the default message text. I'm looking into that.
But it seems like this is probably the simplest way to accomplish what I want.
This is probably what you're after for twitter: https://twitter.com/about/resources/buttons#tweet
Let's you configure a button (or URL to redirect to) that starts the user off with some default text. The user can change the text before they post.
Don't know about facebook.
Twitter Integration:
Check this code and link/article simple and easy :
protected void btnTweet_Click(object sender, EventArgs e)
{
string oauthAccessToken = Session["twtoken"].ToString();
string oauthAccessTokenSecret = Session["twsecret"].ToString();
OAuthHelper oauthhelper = new OAuthHelper();
oauthhelper.TweetOnBehalfOf(oauthAccessToken, oauthAccessTokenSecret, txtTweet.Text);
if (string.IsNullOrEmpty(oauthhelper.oauth_error))
Response.Write("Twit Posted Successfully");
else
Response.Write(oauthhelper.oauth_error);
}
Read more how to get access token and secret key and download OAuthHelper and OAuthUtility Class below is the link -
How to post tweet on behalf of an user from asp.net using oauth authentication
Login with twitter using oauth authentication in asp.net and get access token, screen name and userid

Remove Facebook Tag Ids From Album Description when displaying on website

I am creating an Asp.net website and part of the spec is to pull in the photo albums from the clients Facebook Page and display the albums and photos on the website.
This is no problem and is almost finished. I am using a mixtutre of custom code, the C# Facebook SDK and FQL calls to graph.facebook.com
The problem is displaying the album description on the website. It contains Facebook Tag/ID information if another Facebook page has been tagged in the description.
The Tag/Ids are always in the same format #[999184210888:274:TAGGED PAGE NAME]
An example:
"Our business learned a lot at the #[244184210470:274:HYPER WEB NET CO] web seminar last week. Here are the photos."
To see a real description from graph.facebook.com that contain these Tags/Ids follow this link: https://graph.facebook.com/556781864402615
Has anyone ever encountered this? Is there a standard way to not display these Tags (Maybe by posting a query-string to graph.facebook.com)?
Or a way to extract the name 'HYPER WEB NET CO' from inside the tags?
Or maybe somebody has written some c# and a regex to remove these?

How to get twitter user timeline in C# using Twitterizer

i have the following code.
Twitter t1 = new Twitter("twitteruser","password");
TwitterUser user = t1.User.Show("username");
if (user != null)
{
TwitterParameters param = new TwitterParameters();
param.Add(TwitterParameterNames.UserID, user.ID);
TwitterStatusCollection t =t1.Status.UserTimeline(param);
}
In the above code, I want to get user timeline. I am using Twitterizer API. The twitter documentation for getting timeline of user is Here
I have checked the fiddler whats going on. In fiddler the request is :
http://api.twitter.com/1/direct_messages.xml?user_id=xxxxx
while i am expecting
http://twitter.com/statuses/user_timeline.format
Is anything left which i miss.
This is a bug in the latest version of the Twitterizer Library.
I will try to get this corrected and post an update today.
If you run into any other issues, please contact the Twitterizer group directly, on our site (http://www.twitterizer.net/) you'll find links to our mailing list, twitter account, and you can submit but reports directly to our team.
Ricky (Twitterizer founder)
Here's how to get a user's timeline without using oAuth or any authentication, for that matter:
UserTimelineOptions options = new UserTimelineOptions();
options.ScreenName = "SCREENNAME OF TWITTER USER";
TwitterStatusCollection tweets = TwitterTimeline.UserTimeline(options).ResponseObject;
I have to agree with Eric. I only looked at Twitterizer for a few hours, and I have not found one example that shows how to load a user's timeline without authorization.
Will I figure it out eventually? Yeah, I'll have to and I will; but it will take me forever.
The link that Ricky Smith gave (twitterizer.net) doesn't have this kind of simple example. The tutorials available on the internet that I found for twitterizer2, even those are not up-to-date and don't quite work or are missing information.
Ricky, how about being a lifesaver to me and others and showing us how to simply look at a user's public timeline, so there's no need for authorization? Whaddya'say?

Categories

Resources