[Owasp-o2-platform] TwitterAPI

dinis cruz dinis.cruz at owasp.org
Wed Jul 14 10:20:05 EDT 2010


Humm, that location is where .NET puts ALL click-once apps that are
installed on that computer (nice and user-friendly isn't it :)  ).

You can easily find that directoty if you open the 'O2 Executable Directry'
in the "API/Script Development Tab (just noticed the spelling mistake and
just fixed it + pushed the update to the SVN server :) (the update is only
available for the ones running the ClickOnce version))

That said, that dll should had been automatically downloaded from O2's SVN
site (i.e. from here
http://o2platform.googlecode.com/svn/trunk/O2%20-%20All%20Active%20Projects/_3rdPartyDlls/)
so maybe you have some permissions issue or network connectivity that is
preventing the download (did the O2 LogViewer show any errors?)

There is a script in there that compiles ALL available scripts and downloads
as required all referenced files into the ClickOnce or locally installed
directory. You can use this script to debub simiilar issues. The script is
the 'Compile ALL Scripts' link that you can find in the 'Help' tab  (I use
this to test new versions and make sure the latest changes don't break any
scripts).

Can you run this 'Compile ALL Scripts' script (which is at
\_Scripts\Utils\_O2_Development\Compile All Local O2 Scripts.h2) and let me
know if you have any compilation errors?

Thanks

Dinis Cruz

Blog: http://diniscruz.blogspot.com
Twitter: http://twitter.com/DinisCruz
Web: http://www.owasp.org/index.php/O2


On 14 July 2010 10:18, Steven van der Baan <steven at vdbaan.net> wrote:

> Hi Dinis,
>
> i located where i have to put the DLL. It was in some obscure location at
> AppData\Local\Apps\2.0\ and them some weird location names which i would not
> connect to O2. The OnceClick install doesn't use a install directory but
> installs it there. After placing the Newtonsoft.dll there the twitter client
> opened up. I still don't know why it didn't download it to the correct
> directory in the first place, but i'll try to find that out as well.
>
> And now i'm going to try to patch the twitter_client.h2
>
> Greetings,
> Steven.
>
>
>
> On 14 July 2010 02:12, dinis cruz <dinis.cruz at owasp.org> wrote:
>
>> Humm, I just noticed an issue with that API (thanks Colin) If you look at
>> the first line of the *'APIs\Twitter\Twitter Client.h2'* script, it
>> expects a secrets file to be located in
>>
>> *var fileWithCredentials = @"C:\O2\_USERDATA\TwitterAccounts.xml";'*
>>
>>
>> and this secrets file should contain the desired user(s) with the
>> CredentialType to be marked as 'Twitter'
>>
>> *secretData = fileWithCredentials.deserialize<SecretData>();*
>> *usersComboBox.clear();           ** ** ** *
>> *usersComboBox.add_Items(secretData.usernames("Twitter"));*
>>
>>
>> To create this file use the "O2 'Secret Data' Editor" link which you can
>> find in the "Windows Tools" Tab (and yeah the workflow on that tool needs
>> some improvement too :)  )
>>
>> Steven, can you see if you can solve this (i.e. prompting the user for the
>> credentials) and send me a patch :) . If you want a clue on how to do it
>> (and what APIs to use) check out the *API_Blogger.cs* script (line 98
>> more specifically :)  )
>>
>> Have fun
>>
>> Dinis Cruz
>>
>>
>> On 14 July 2010 00:31, Dinis Cruz <dinis at ddplus.net> wrote:
>>
>>> Stick with the web install since I'm about to push a small update on that
>>> twitter API which will help you
>>>
>>> Can you try compiling it using the 'O2 Development Environment' (on the
>>> 'API / Script Development' tab)?
>>>
>>> Meanwhile, I'm going to forward you the details of the O2 testbox at
>>> Amazon EC2 so that you can use to try it (or replicate the problem)
>>>
>>> Dinis
>>>
>>>
>>> On Wed, Jul 14, 2010 at 12:20 AM, Steven van der Baan <steven at vdbaan.net
>>> > wrote:
>>>
>>>> Unfortunately that doesn't compile. Even after a restart or using the
>>>> option. I did place the dll in the install directory (I think it is c:\O2,
>>>> but i didn't see it in the log file). Am thinking of doing a complete
>>>> reinstall and check if that will help (i used the web installer and not the
>>>> MSI).
>>>>
>>>> I'll try to locate the possible differences between the web and MSI
>>>> installer, maybe it has something to do with that.
>>>>
>>>> Greetings,
>>>> Steven
>>>>
>>>>
>>>>
>>>> On 14 July 2010 00:56, dinis cruz <dinis.cruz at owasp.org> wrote:
>>>>
>>>>> Actually that file should had been automatically downloaded from the O2
>>>>> SVN codebase and placed on the O2 install directory (check the O2 LogViewer
>>>>> for details)
>>>>>
>>>>> To double check that all is working, can you run this script on the 'O2
>>>>> Simple Script Editor'?
>>>>>
>>>>> var twitterAPI = new O2TwitterAPI();
>>>>> return twitterAPI;
>>>>>
>>>>> //using O2.XRules.Database.APIs
>>>>> //O2File:O2TwitterAPI.cs
>>>>> //O2Ref:Dimebrain.TweetSharp.dll
>>>>> //O2Ref:Newtonsoft.Json.dll
>>>>>
>>>>> If that compiles OK and returns the O2TwitterAPI object, then all
>>>>> should be good
>>>>>
>>>>> (note you might need to restart O2 or click the option 'current source
>>>>> code' --> 'clear AssembliesCheckedIfExists list' context menu option from
>>>>> the  'O2 Simple Script Editor')
>>>>>
>>>>> Dinis Cruz
>>>>>
>>>>>
>>>>> On 13 July 2010 23:24, Steven van der Baan <steven at vdbaan.net> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> i'm trying to use the Twitter client but i get the following error:
>>>>>> ERROR: [CSharp_FastCompiler] Compilation Error: 0::0::CS0006::Metadata
>>>>>> file 'Newtonsoft.Json.dll' could not be found::
>>>>>>
>>>>>> I know that i can place this DLL in my windows system32 directory to
>>>>>> make it work, but i don't like to do that. I rather place those type of
>>>>>> DLL's with the application which is requesting it. Is there a 'default'
>>>>>> location for foreign DLL's or another trick to make the O2Platform load
>>>>>> them.
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Steven.
>>>>>>
>>>>>> _______________________________________________
>>>>>> Owasp-o2-platform mailing list
>>>>>> Owasp-o2-platform at lists.owasp.org
>>>>>> https://lists.owasp.org/mailman/listinfo/owasp-o2-platform
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Owasp-o2-platform mailing list
>>>> Owasp-o2-platform at lists.owasp.org
>>>> https://lists.owasp.org/mailman/listinfo/owasp-o2-platform
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20100714/7927f569/attachment-0001.html 


More information about the Owasp-o2-platform mailing list