Uploading attachments using ForceTk

Please suggest me how to put attachments for a record under notes and attachments using forceTk, currently i’m using the following code and it creates attachments, but i’m not sure how to link these attachments to one of my existing records in salesforce. Do i have to update the parent.id or something of each attachment. I am using the standard code from forceTk github repo. and it’s given below.

Trigger to use HTTP callout and update record with the results

I have been trying to integrate Google Shortener API into my salesforce org. I wrote a class to make the call out, but am having difficulty bringing the value back into the record. I have a custom object called “referral_advocate__c” with a field called “Short_URL__c”. Anytime the field “unique_ID__c” has a value, I am wanting to send this value with a static URL to google shortener and then save the response value to “referral_advocate__c.short_URL__c” on the record. This is the class to make the call out:

Please suggest a way to post to salesforce rest resource without using the username and password as the authentication

I’m trying to post to a Salesforce Rest Resource from a java console app. Currently I’m exposing it as a public resource via custom portals.
I’m looking for suggestions for a way to implement the authentication without passing username, password. I have checked OAuth flows but I believe all of them require a callback implementation to read the tokens. It will be helpful if you can suggest a way to authorize in an implicit manner.

Salesforce Rest API create account

We are using the Salesforce Rest API to integrate our external website with Salesforce Sales Cloud. When a user registers on our website, we create a contact record in Salesforce. The response to the initial insert request includes the Contact ID. Is there a way we can have the initial request return more fields? On the SF side, we have a formula field that generates the 18 digits long contact ID and we need that returned to us for interacting with the Marketing Cloud. We can make another call to get this long contact ID but we are trying to avoid this extra call. Is what we are trying to do achievable?