Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8870927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:51:21+00:00 2026-06-14T17:51:21+00:00

I am using the Tweetsharp library and the user to be able to post

  • 0

I am using the Tweetsharp library and the user to be able to post twitter status from my site .

The code for the HomeController is below, and the problem is that the calllback is not functioning properly. Twitter is not accepting localhost, so in Application setting I have kept it blank, nnd in code I am sending a callback url.

'using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TweetSharp;
using System.Web.Configuration;
using Microsoft.Web.WebPages.OAuth;

namespace youtube.Controllers
{
    public class HomeController : Controller
    {
        private string ConsumerKey = WebConfigurationManager.AppSettings["ConsumerKey"];
        private string ConsumerSecret = WebConfigurationManager.AppSettings["ConsumerSecret"];

        public ActionResult Index()
        {

            return View();
        }

        public ActionResult Authorize()
        {
            string _consumerKey = System.Configuration.ConfigurationManager.AppSettings["ConsumerKey"];
            string _consumerSecret = System.Configuration.ConfigurationManager.AppSettings["ConsumerSecret"];
            TwitterService service = new TwitterService(_consumerKey, _consumerSecret);
            //service.
            OAuthRequestToken requestToken = service.GetRequestToken();

            var uri = service.GetAuthorizationUri(requestToken,"http://localhost:50852/AuthorizeCallBack");
            return new RedirectResult(uri.ToString(), false);
        }


            public ActionResult AuthorizeCallback(string oauth_token, string oauth_verifier)
            {
                var requestToken = new OAuthRequestToken {Token = oauth_token};


                TwitterService service = new TwitterService(ConsumerKey, ConsumerSecret);
                OAuthAccessToken accessToken = service.GetAccessToken(requestToken, oauth_verifier);


                service.AuthenticateWith(accessToken.Token, accessToken.TokenSecret);
                TwitterUser user = service.VerifyCredentials();
                ViewBag.Message = string.Format("Your username is {0}", user.ScreenName);
                return View();
        }


    }

}'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:51:22+00:00Added an answer on June 14, 2026 at 5:51 pm

    Twitter accepts:

    http://127.0.0.1:{port}/anything
    

    At least it’s working for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the last version of the tweetsharp library for the twitter api, i am
i am using the latest version of tweetsharp from their site (TweetSharp.Next - Version
i'm using tweetsharp to allow users to log into my site with their twitter
I'm using TweetSharp to find the followers for a user. Here is the code:
Does anyone know how to log a user out of Twitter using Tweetsharp? I
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
I'm using the Twitter API (via TweetSharp) and was wondering if it's possible to
I'm attempting to create a web application with TweetSharp that will connect to Twitter
Using mercurial, I've run into an odd problem where a line from one committer
I am trying to update the status using tweetsharp oauth preview 17. Please let

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.