Tagged: facebook Toggle Comment Threads | Keyboard Shortcuts

  • danielsaidi 8:50 pm on December 1, 2011 Permalink | Reply
    Tags: api, , facebook, fredrik mörk, , , nathan totten, neil ford, , phil haack   

    Øredev 2011 in the rear-view mirror – Part 2 

    Øredev logo

    This is the second part of ny sum-up of Øredev 2011.

    I will label each session with day:order to satisfy all structure freaks (myself included) that read this.

    1:4 – Phil Haack – Building Mobile applications with ASP.NET MVC4, HTML5 and jQuery Mobile

    This session was quite interesting, since Phil discussed a lot of aspects of mobile browsing and how ASP.NET MVC4 can help you out by introducing .

    Adaptive rendering will be added to the default web application template, which will cause the page to automatically render differently depending on the size of the screen. If you want to view how adaptive rendering works, check out Zurb Foundation. In other words, ASP.NET MVC4 does not introduce adaptive rendering to the world – there are already plenty of free options that you can greb and use directly after reading this post. It’s just a convenience.

    Another new, cool feature is that it is possible to create device-specific variations of the same view, so that Index.cshtml is the default one and Index.iphone.cshtml is the variation that you’ll see when viewing the site in your iPhone. Custom modes can be registered in global.asax, which means that you are entirely free to tailor your own set of custom views.

    Phil also demonstrated using iBBDemo2 for simulating an iPhone when browsing the web. Quite handy if you want to easily be able to try out your custom views.

    All in all, a quite interesting session, although Phil did not seem too enthusiastic about it. Also, the wifi at Øredev was a disaster, and caused several speakers a lot of problems. I really hope they improve this until next year.

    1:5 – Nathan Totten – Facebook Development

    Nathan was yet another speaker who got hit hard by the wifi problems, as he demonstrated how to develop apps for Facebook. I really enjoyed this session, despite the technical problems and the fact that I already have developed Facebook apps. Since I am self-taught in doing so, though, listening to Nathan explaining several parts that I have not gotten around to work with before, was a great take-away.

    Nathan talked about various types of Facebook applications, like iFrame apps, web sites with Facebook Connect, mobile applications, desktop applikations (like Spotify) etc. and how they use OAuth 2.0, REST services, the Facebook Graph API and FQL to integrate with Facebook. He also discussed the JavaScript and C# Facebook SDK:s. His advice was to use the JavaScript SDK whenever possible, and to a server-side SDK whenever the integration should be more invisible.

    Finally, Nathan demonstrated how he works with local and live applications, e.g. if you are developing an application locally (running on localhost) and have it live as well. He then creates two separate FB apps – one that is bound to the live site and one that is bound to localhost. Quite convenient. He also told us that  FBML is dead, so do not use it ever again 🙂

    1:6 – Fredrik Mörk – API – the hidden UI

    The first Swedish speaker I got around to listen to was Fredrik Mörk, who spoke about how we have to give our API:s the same tender loving care that we give our UI:s. Users shun bad GUI:s, while developers shun bad API:s, so we should put some effort into our API designs.

    An API must be discoverable, but how? Always assume that the user knows nothing. So, adapt conventions used by other API:s, so that developers instantly recognize the API instead of having to remember it. even if they have not used it before. This involves making it possible to navigate through the API, adapting naming conventions (delete or remove, store or save etc.), put an equal amount of attention to all parts of the API and…take care of the API like you do with other parts of your systems.

    Fredrik advised us to always expose as primitive as possible, to make the API accessible to as many as possible. Always choose abstract before concrete…and choose your abstraction according to the purpose. For instance, if you expose an IList instead of an IEnumerable, you are communicating that you expect your users to insert stuff into it.

    Fredrik’s view upon an API is that once it is out there, it is no longer yours to change. A GUI can change…an API cannot. But, be careful with inserting stuff into your API just because a user wants it in there. It will ultimately bloat your API. And when you insert stuff, be intentional. Do not let chance determine where a feature ends up and what it is called.

    All in all a good session…and quite liberating with a Swenglish accent instead of the spotless American, Scottish and British ones that dominated the rest of the day.

    1:7 – KEYNOTE: Neil Ford – Abstraction Distractions

    After a long day, we decided to skip this session and go for a short nap before hitting a meat restaurant. I have not spoken with anyone who attended it either, so I am at a loss whether it was good, bad or just meh. It will be interesting to check out the video once it is released.

  • danielsaidi 7:54 pm on April 4, 2011 Permalink | Reply
    Tags: authentication, facebook, facebook api, localhost   

    Running Facebook authentication on localhost 

    It has sure taken its sweet time, but I have finally started working with an ASP.NET MVC3 project that will use the Facebook API to create and login users. It’s really easy, and quite cool, and I curse myself for not having a look at this earlier.

    However, after creating a Facebook app and pasting in the short code snippet that lets you log in with your Facebook account, I noticed that I was not allowed to do so from my localhost:

       API Error Code: 191
       API Error Description: The specified URL is not owned by the application
       Error Message: redirect_uri is not owned by the application.

    Sure, you must enter an app URL when you register your app, but I really expected it to be possible to use the API while developing locally…

    …and it turned out that it is. This is how you do it:

    • Create a web site, if you do not have one already
    • Create the FB app that will be used by the web site
    • Give the FB app an URL that you can manage, e.g. http://myapp.mydomain.com/
    • Make sure that the URL exists – it can be an empty folder, but it must exist and be public
    • If you upload some of the FB code snippets to this URL, they should work.

    To enable the FB features on localhost, you must create a web site with the same binding as the URL above. I have only tried this with IIS 7 / Windows 7 – please let me know if you make it work on Apache, in OS X etc.

    That’s it. Note, however, that some FB features will not work if the live site misses certain pages. For instance, if you use the Like button to like a local page, it will not work if the URL does not exist at the live site.

    • kanishka 12:23 pm on April 16, 2011 Permalink | Reply

      thanks for the post.
      i am not able to bind my site on the local host in the way you specified..i am using windows 7..Can you tell what all should be mentioned for the following text boxes:–

      Site name
      Physical Path
      binding : type, ip , port
      Host name


      • danielsaidi 9:50 pm on May 1, 2011 Permalink | Reply


        Just go to the IIS manager, right-click the web site in the tree view and choose “Edit bindings”. There, you just have to set the host name to be the same url as the one that Facebook connect uses. Leave everything else as is, click ok, and you should be good to go…but remember to also add the url to your hosts file.

    • vidjinvideos 10:32 pm on November 27, 2011 Permalink | Reply

      Not working 😦

    • Sachin 11:04 am on July 26, 2013 Permalink | Reply

      thanks a lot.. I was not adding name in host file, finally got the clue from your article and works for me.. thanks a lot again

  • danielsaidi 10:37 pm on September 23, 2009 Permalink | Reply
    Tags: facebook, , , twitter, twitterbar   

    TwitterBar – THE Firefox plugin! 

    To all Twitter users, I have found THE Firefox plugin – TwitterBar! TwitterBar makes it possible to post tweets directly from the Firefox address bar. Just type a message and end it with –post, and TwitterBar will post it automatically…like this:

    (In the address bar) Testing TwitterBar --post

    I also assume that you are using the Twitter plugin for Facebook, which automatically updates your Facebook status for each new tweet…ah, the wonders of technology! 🙂


Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc