 |
| ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 26th, 2010, 09:50 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
I think you didn't understand Json.
It's a way to put data so you can download it to a class (object). Since the structure is know by everyone involved, it can be handle by a lot of languages.
.Net didn't add a serializer until version 4, but you can add and make the JSon structure by yourself. It's in fact a text file with common structure.
So the thing you have to do is build a string according to the rules they are posting on the guide. For example:
Name: "your name", etc...
According to all the post you are making, the object you need to serialize is attachment... Since you don't have an auto method to do it, you will have to build the string yourself.
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|
|
The Following User Says Thank You to gbianchi For This Useful Post:
|
|
|

October 27th, 2010, 07:34 AM
|
|
Authorized User
|
|
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
can you give me a download link for it?
and show how do i write it(just the start?) pleaseeeee
its will help me alot!!!! 
|
|

October 27th, 2010, 08:24 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
Sorry, a download for what?
And show you how to writte what part? , you already have the object code, you don't know how to build a string?
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|
|

October 27th, 2010, 12:16 PM
|
|
Authorized User
|
|
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
i need to wirte this
PHP Code:
var message = 'Check out this cute pic.';
var attachment = {
"name": "i'm bursting with joy",
"href": " http://bit.ly/187gO1",
"caption": "{*actor*} rated the lolcat 5 stars",
"description": "a funny looking cat",
"properties": {
"category": { "text": "humor", "href": "http://bit.ly/KYbaN"},
"ratings": "5 stars"
},
"media": [{
"type": "image",
"src": "http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg",
"href": "http://bit.ly/187gO1"}]
};
var action_links = [{"text":"Recaption this", "href":"http://bit.ly/19DTbF"}];
FB.Connect.streamPublish(message, attachment, action_links);
and i need to download from google the class
|
|

October 27th, 2010, 01:21 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
I have suggested a number of fixes and simplifications to your code to make it easier to translate this to VB in this thread: i need help( convert c to vb.net). I see none of this in the code you have now.
I think you're missing a number of important fundamentals which will make this very difficult for you to program. Also, the fact you're not responding to folloow up questions by providing more scope as to why you need this code, what the attachment_media classes are, where they come from, why you don't use the SDK to talk to Facebook and so on, make it very difficult for us to help you.
In other words: understand and know what you want, communicate that clearly over this forum, read and experiment and read some more and you can make this work. Otherwise, I have a bad feeling about your success here.
Cheers,
Imar
|
|

October 27th, 2010, 01:28 PM
|
|
Authorized User
|
|
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
the vb code are not supprot,so its must be in json.
i need to replace mt vb code with the json code.
can i do it in visual studio 2008? and how i do it?
thanks for trying to help!
|
|

October 27th, 2010, 02:19 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
VB and JSON are quite different. VB is programming language, JSON a data exchange format. So, your statement:
Quote:
the vb code are not supprot,so its must be in json.
i need to replace mt vb code with the json code.
|
makes no sense at all.
Furthermore, you're not answering my questions so I don't understand why you think we can help you.
I guess you need to Google for this, or be perfecly clear. Without lots of relevant info, I can't help you anymore.
Imar
|
|

October 27th, 2010, 02:28 PM
|
|
Authorized User
|
|
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
ok simple questions
how do i write json code in visual studio 2008?
|
|

October 27th, 2010, 02:52 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Have you searched Google for this?
http://lmgtfy.com/?q=JSON+.NET
Imar
|
|

October 27th, 2010, 06:14 PM
|
|
Authorized User
|
|
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
yes i search.
but can i just paste the code? or i need to write it with other way?
thanks for all the help!
|
|
 |