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 3500912
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:47:36+00:00 2026-05-18T12:47:36+00:00

In trying to implement the Twitter code at http://www.voiceoftech.com/swhitley/?p=681 I am getting a compile

  • 0

In trying to implement the Twitter code at http://www.voiceoftech.com/swhitley/?p=681 I am getting a compile time error:

The name “apiResponse does not exist in the current context”,

Usually I would fix a problem of this type by fully qualifying the call, for example instead of saying:

Response.Redirect(oAuth.AuthorizationLinkGet());

I would instead say:

System.Web.HttpContext.Current.Response.Redirect(oAuth.AuthorizationLinkGet());

The problem is, I have no idea what to do with the apiResponse problem. Any ideas?

Here is the relevant code file:

using System;  
using System.Data;  
using System.Configuration;  
using System.Collections;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using System.Net;  
using System.IO;  
using System.Collections.Specialized;    
namespace ArduinoSerialCommTest  
{  
    class Tweet  
    {
        protected void Page_Load(object sender, EventArgs e)  
        {  
            string url = "";
            string xml = "";
            oAuthTwitter oAuth = new oAuthTwitter();

            if (System.Web.HttpContext.Current.Request["oauth_token"] == null)
            {
                //Redirect the user to Twitter for authorization.
                //Using oauth_callback for local testing.
                oAuth.CallBackUrl = "http://localhost";
               System.Web.HttpContext.Current.Response.Redirect(oAuth.AuthorizationLinkGet());
            }
            else
            {
                //Get the access token and secret.
                oAuth.AccessTokenGet(System.Web.HttpContext.Current.Request["oauth_token"], System.Web.HttpContext.Current.Request["oauth_verifier"]);
                if (oAuth.TokenSecret.Length > 0)
                {
                    //We now have the credentials, so make a call to the Twitter API.
                    url = "http://twitter.com/account/verify_credentials.xml";
                    xml = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, url, String.Empty);
                    apiResponse.InnerHtml = System.Web.HttpContext.Current.Server.HtmlEncode(xml);

                    //POST Test
                    //url = "http://twitter.com/statuses/update.xml";
                    //xml = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, url, "status=" + oAuth.UrlEncode("Hello @swhitley - Testing the .NET oAuth API"));
                    //apiResponse.InnerHtml = Server.HtmlEncode(xml);
                }
            }
        }
    }
}
  • 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-05-18T12:47:37+00:00Added an answer on May 18, 2026 at 12:47 pm

    apiResponse is a server side div in a aspx page. Please check again. If you do not have any div there, put the following there.

    <div id="apiResponse" runat="server"> </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement http://github.com/bengottlieb/Twitter-OAuth-iPhone/tree/master into my code. I'm following the Demo provided and
I am trying to implement Twitter's OAuth into my Code Igniter web application at
I am trying to implement Twitter Bootstrap tabs in the following code, but it
I am trying to implement login with twitter using the node.js ntwitter package. https://github.com/AvianFlu/ntwitter
Hey guys I am trying to implement the twitter for posting the comments about
im trying to implement a login with facebook/twitter functionality in my app, i read
I've been trying to implement JavaScript thats read my twitter account ant return to
I have an app that is using twitter-bootstrap and I am trying to implement
I'm trying to implement Twitter login for my web application. I use scribe to
I've been battling with OAuth and Twitter for 2 weeks now trying to implement

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.