iTween RotateTo in C#

My character automatically runs forward and I’m trying to SMOOTHLY rotate the camera to an object behind the character by holding down R and then have the character face an object in front of it by releasing R.

My code is below. Any help is appreciated.

    using UnityEngine;
using System.Collections;

public class Rotation02 : MonoBehaviour {public Transform target; public Transform target2;

    // Update is called once per frame
    void Update () {

       if (Input.GetKeyUp(KeyCode.R))

I get an error that says:
Assets/Standard Assets/Scripts/General Scripts/Rotation02.cs(11,32): error CS1501: No overload for method RotateTo' takes 4’ arguments

You have several errors in your code:

You cannot convert a transform into a game object. Instead of writing GameObject(target), write target.gameObject.

Secondly, you’re not giving the tween anywhere to rotate to. It’s the equivalent of you saying to someone “hey, rotate to _____” but you never actually say where to rotate. The first parameter of RotateTo() tells iTween what GameObject to rotate, and then inside the Hash(), you need to specify where to rotate among other additional parameters such as the easeType which you are using.

For example inside your Hash() it should say something like iTween.Hash("x", 25, "y", 90, "z", 0). You really should read the official iTween documentation to get a good handle of how to use that method.